public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Salyzyn <salyzyn@android.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Prarit Bhargava <prarit@redhat.com>
Cc: 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>,
	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>, "Theodore Ts'o" <tytso@mit.edu>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH 2/2] printk: Add boottime and real timestamps
Date: Tue, 25 Jul 2017 15:39:16 -0700	[thread overview]
Message-ID: <3ac0a334-6779-535a-dfe1-086ae7333bda@android.com> (raw)
In-Reply-To: <20170725130034.jxcqrosqcrhw3shm@hirez.programming.kicks-ass.net>

On 07/25/2017 06:00 AM, Peter Zijlstra wrote:
> On Tue, Jul 25, 2017 at 08:17:27AM -0400, Prarit Bhargava wrote:
>> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
>> index 5b1662ec546f..6cd38a25f8ea 100644
>> --- a/lib/Kconfig.debug
>> +++ b/lib/Kconfig.debug
>> @@ -1,8 +1,8 @@
>>   menu "printk and dmesg options"
>>   
>>   config PRINTK_TIME
>> -	int "Show timing information on printks (0-1)"
>> -	range 0 1
>> +	int "Show timing information on printks (0-3)"
>> +	range 0 3
>>   	default "0"
>>   	depends on PRINTK
>>   	help
>> @@ -13,7 +13,8 @@ config PRINTK_TIME
>>   	  The timestamp is always recorded internally, and exported
>>   	  to /dev/kmsg. This flag just specifies if the timestamp should
>>   	  be included, not that the timestamp is recorded. 0 disables the
>> -	  timestamp and 1 uses the local clock.
>> +	  timestamp and 1 uses the local clock, 2 uses the monotonic clock, and
>> +	  3 uses real clock.
>>   
>>   	  The behavior is also controlled by the kernel command line
>>   	  parameter printk.time=1. See Documentation/admin-guide/kernel-parameters.rst
>
> choice
> 	prompt "printk default clock"
> 	default PRIMTK_TIME_DISABLE
> 	help
> 	 goes here
>
> 	config PRINTK_TIME_DISABLE
> 	bool "Disabled"
> 	help
> 	 goes here
>
> 	config PRINTK_TIME_LOCAL
> 	bool "local clock"
> 	help
> 	 goes here
>
> 	config PRINTK_TIME_MONO
> 	bool "CLOCK_MONOTONIC"
> 	help
> 	 goes here
>
> 	config PRINTK_TIME_REAL
> 	bool "CLOCK_REALTIME"
> 	help
> 	 goes here
>
> endchoice
>
> config PRINTK_TIME
> 	int
> 	default 0 if PRINTK_TIME_DISABLE
> 	default 1 if PRINTK_TIME_LOCAL
> 	default 2 if PRINTK_TIME_MONO
> 	default 3 if PRINTK_TIME_REAL
>
>
> Although I must strongly discourage using REALTIME, DST will make
> untangling your logs an absolute nightmare. I would simply not provide
> it.

I agree with using select, ensures only valid values are landed. It does 
mean that CONFIG_PRINTK_TIME in-effect gets deprecated.

REALTIME is always UTC in the kernel.

What about BOOTTIME?

-- Mark

  reply	other threads:[~2017-07-25 22:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 12:17 [PATCH 0/2] printk: allow different timestamps for printk.time Prarit Bhargava
2017-07-25 12:17 ` [PATCH 1/2] printk: Make CONFIG_PRINTK_TIME an int Prarit Bhargava
2017-07-25 12:55   ` Luis R. Rodriguez
2017-07-31 17:11     ` Prarit Bhargava
2017-07-25 12:17 ` [PATCH 2/2] printk: Add boottime and real timestamps Prarit Bhargava
2017-07-25 13:00   ` Peter Zijlstra
2017-07-25 22:39     ` Mark Salyzyn [this message]
2017-07-28 15:01     ` Prarit Bhargava
2017-07-28 16:28       ` Thomas Gleixner
2017-07-27  3:02   ` kbuild test robot

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=3ac0a334-6779-535a-dfe1-086ae7333bda@android.com \
    --to=salyzyn@android.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=sboyd@codeaurora.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tytso@mit.edu \
    /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