From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752373AbdG1PBy (ORCPT ); Fri, 28 Jul 2017 11:01:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38442 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752348AbdG1PBw (ORCPT ); Fri, 28 Jul 2017 11:01:52 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DD20D7A7BF Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=prarit@redhat.com Subject: Re: [PATCH 2/2] printk: Add boottime and real timestamps To: Peter Zijlstra References: <1500985047-23038-1-git-send-email-prarit@redhat.com> <1500985047-23038-3-git-send-email-prarit@redhat.com> <20170725130034.jxcqrosqcrhw3shm@hirez.programming.kicks-ass.net> Cc: linux-kernel@vger.kernel.org, Mark Salyzyn , Jonathan Corbet , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , John Stultz , Thomas Gleixner , Stephen Boyd , Andrew Morton , Greg Kroah-Hartman , "Paul E. McKenney" , Christoffer Dall , Deepa Dinamani , Ingo Molnar , Joel Fernandes , Kees Cook , Geert Uytterhoeven , "Luis R. Rodriguez" , Nicholas Piggin , "Jason A. Donenfeld" , Olof Johansson , "Theodore Ts'o" , Josh Poimboeuf , linux-doc@vger.kernel.org From: Prarit Bhargava Message-ID: Date: Fri, 28 Jul 2017 11:01:48 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170725130034.jxcqrosqcrhw3shm@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 28 Jul 2017 15:01:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/25/2017 09: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 > > Thanks for the above change. I can see that makes the code simpler. > Although I must strongly discourage using REALTIME, DST will make > untangling your logs an absolute nightmare. I would simply not provide > it. I understand your concern, however, I've been in situations where REALTIME stamping has pointed me in the direction of where a bug was. Even with the complicated logs I think it is worthwhile. P.