mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Prarit Bhargava <prarit@redhat.com>
Cc: Mark Salyzyn <salyzyn@android.com>,
	linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	John Stultz <john.stultz@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Christoffer Dall <cdall@linaro.org>,
	Deepa Dinamani <deepa.kernel@gmail.com>,
	Ingo Molnar <mingo@kernel.org>,
	Joel Fernandes <joelaf@google.com>,
	Kees Cook <keescook@chromium.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"Luis R. Rodriguez" <mcgrof@kernel.org>,
	Nicholas Piggin <npiggin@gmail.com>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	Olof Johansson <olof@lixom.net>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH v3] printk: Add boottime and real timestamps
Date: Mon, 7 Aug 2017 22:34:03 +0900	[thread overview]
Message-ID: <20170807133403.GA405@jagdpanzerIV.localdomain> (raw)
In-Reply-To: <8aa07623-22ca-bf49-e81d-7cb9ec4e67fb@redhat.com>

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

  reply	other threads:[~2017-08-07 13:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04  1:18 Prarit Bhargava
2017-08-04 15:36 ` Mark Salyzyn
2017-08-07 12:41   ` Prarit Bhargava
2017-08-07 13:34     ` Sergey Senozhatsky [this message]
2017-08-04 16:42 ` Mark Salyzyn
2017-08-07 17:14 ` Luis R. Rodriguez
2017-08-07 18:17   ` Prarit Bhargava
2017-08-09 18:24     ` Luis R. Rodriguez
2017-08-09 22:42       ` Prarit Bhargava

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170807133403.GA405@jagdpanzerIV.localdomain \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=akpm@linux-foundation.org \
    --cc=cdall@linaro.org \
    --cc=corbet@lwn.net \
    --cc=deepa.kernel@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=joelaf@google.com \
    --cc=john.stultz@linaro.org \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=mingo@kernel.org \
    --cc=npiggin@gmail.com \
    --cc=olof@lixom.net \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=prarit@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=salyzyn@android.com \
    --cc=sboyd@codeaurora.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®