[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170807133403.GA405@jagdpanzerIV.localdomain>
Date: Mon, 7 Aug 2017 22:34:03 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Prarit Bhargava <prarit@...hat.com>
Cc: Mark Salyzyn <salyzyn@...roid.com>, linux-kernel@...r.kernel.org,
Jonathan Corbet <corbet@....net>,
Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
John Stultz <john.stultz@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Stephen Boyd <sboyd@...eaurora.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Christoffer Dall <cdall@...aro.org>,
Deepa Dinamani <deepa.kernel@...il.com>,
Ingo Molnar <mingo@...nel.org>,
Joel Fernandes <joelaf@...gle.com>,
Kees Cook <keescook@...omium.org>,
Peter Zijlstra <peterz@...radead.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
"Luis R. Rodriguez" <mcgrof@...nel.org>,
Nicholas Piggin <npiggin@...il.com>,
"Jason A. Donenfeld" <Jason@...c4.com>,
Olof Johansson <olof@...om.net>,
Josh Poimboeuf <jpoimboe@...hat.com>, linux-doc@...r.kernel.org
Subject: Re: [PATCH v3] printk: Add boottime and real timestamps
On (08/07/17 08:41), Prarit Bhargava wrote:
[..]
> >> +static int printk_time_set(const char *val, const struct kernel_param *kp)
> >> +{
> >> + char *param = strstrip((char *)val);
> >> + int _printk_time;
> >> +
> >> + if (strlen(param) != 1)
> >> + return -EINVAL;
> > (see below) strlen is so restrictive, wouldn't it be nice(tm) to allow "boot",
> > "monotonic" or "realtime" strings? Certainly KISS can handle the first letters
> > for next to zero cost. (switch statement optimization)
>
> Thanks Mark,
>
> I had asked this question before and didn't get an answer: Do I need to
> worry about the ABI of /sys/modules/printk/parameters/time. Since it hasn't
> been explicitly added to the stable ABI files, I'm going to assume it wasn't
> important enough to add it. Looking at google, however, leads to a lot
> of hits for 'printk.time' kernel parameters settings so I think I better
> maintain the legacy boolean settings.
yes, please. we have to preserve it.
> I'm going to do: 0/n/N/1/y/Y to maintain the existing ABI, and add (as you
> suggest above 'disable|local|boottime|monotonic|realtime' as valid
> parameters.
>
> >> +
> >> + switch (param[0]) {
> >> + case '0':
> >> + case 'n':
> >> + case 'N':
> > I would wish for a few more 'convenience' cases:
> >
> > case 'd': case 'D': /* Disable */
>
> It would be trivial then to add only the lower case options (I dislike upper
> case settings ...) by adding
yes, please. lower case only.
-ss
Powered by blists - more mailing lists