Re: [PATCH v3] printk: Add boottime and real timestamps

2017-08-09 Thread Prarit Bhargava
On 08/09/2017 02:24 PM, Luis R. Rodriguez wrote: > On Mon, Aug 07, 2017 at 02:17:33PM -0400, Prarit Bhargava wrote: >> >> >> On 08/07/2017 01:14 PM, Luis R. Rodriguez wrote: >> >>> >>> Note printk_late_init() is a late_initcall(). This means if the >>> printk_time_setting was disabled it will

Re: [PATCH v3] printk: Add boottime and real timestamps

2017-08-09 Thread Luis R. Rodriguez
On Mon, Aug 07, 2017 at 02:17:33PM -0400, Prarit Bhargava wrote: > > > On 08/07/2017 01:14 PM, Luis R. Rodriguez wrote: > > > > > Note printk_late_init() is a late_initcall(). This means if the > > printk_time_setting was disabled it will take a while to enable it. > > Enabling it > > is done

Re: [PATCH v3] printk: Add boottime and real timestamps

2017-08-07 Thread Prarit Bhargava
On 08/07/2017 01:14 PM, Luis R. Rodriguez wrote: > > Note printk_late_init() is a late_initcall(). This means if the > printk_time_setting was disabled it will take a while to enable it. Enabling > it > is done at the device_initcall(), so if printk setting is disabled but a user > enables it

Re: [PATCH v3] printk: Add boottime and real timestamps

2017-08-07 Thread Luis R. Rodriguez
On Thu, Aug 03, 2017 at 09:18:44PM -0400, Prarit Bhargava wrote: > index fc47863f629c..8f093dd0a733 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -1202,8 +1204,119 @@ static inline void boot_delay_msec(int level) > } > #endif > > -static bool printk_time =

Re: [PATCH v3] printk: Add boottime and real timestamps

2017-08-07 Thread Sergey Senozhatsky
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

Re: [PATCH v3] printk: Add boottime and real timestamps

2017-08-07 Thread Prarit Bhargava
On 08/04/2017 11:36 AM, Mark Salyzyn wrote: > On 08/03/2017 06:18 PM, Prarit Bhargava wrote: > >> diff --git a/arch/arm/configs/aspeed_g4_defconfig >> b/arch/arm/configs/aspeed_g4_defconfig >> index cfc2465e8b77..6c73c305ad17 100644 >> --- a/arch/arm/configs/aspeed_g4_defconfig >> +++

Re: [PATCH v3] printk: Add boottime and real timestamps

2017-08-04 Thread Mark Salyzyn
On 08/03/2017 06:18 PM, Prarit Bhargava wrote: + /* +* Only allow enabling and disabling of the current printk_time +* setting. Changing it from one setting to another confuses +* userspace. +*/ We should allow a debug option to permit this (but that can be

Re: [PATCH v3] printk: Add boottime and real timestamps

2017-08-04 Thread Mark Salyzyn
On 08/03/2017 06:18 PM, Prarit Bhargava wrote: diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig index cfc2465e8b77..6c73c305ad17 100644 --- a/arch/arm/configs/aspeed_g4_defconfig +++ b/arch/arm/configs/aspeed_g4_defconfig @@ -162,7 +162,9 @@

[PATCH v3] printk: Add boottime and real timestamps

2017-08-03 Thread Prarit Bhargava
printk.time=1/CONFIG_PRINTK_TIME=1 adds a unmodified local hardware clock timestamp to printk messages. The local hardware clock loses time each day making it difficult to determine exactly when an issue has occurred in the kernel log, and making it difficult to determine how kernel and hardware