Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-09 Thread Paul E. McKenney
On Tue, Aug 08, 2017 at 07:08:00PM -0400, Prarit Bhargava wrote: > > > On 08/08/2017 04:28 AM, Peter Zijlstra wrote: > > On Mon, Aug 07, 2017 at 01:36:39PM -0700, Paul E. McKenney wrote: > >> On Mon, Aug 07, 2017 at 04:06:09PM -0400, Prarit Bhargava wrote: > > > >>> peterz? Want to offer a sugg

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-08 Thread Prarit Bhargava
On 08/08/2017 04:28 AM, Peter Zijlstra wrote: > On Mon, Aug 07, 2017 at 01:36:39PM -0700, Paul E. McKenney wrote: >> On Mon, Aug 07, 2017 at 04:06:09PM -0400, Prarit Bhargava wrote: > >>> peterz? Want to offer a suggestion? The issue is that I'm changing a bool >>> config option to an int and

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-08 Thread Prarit Bhargava
On 08/07/2017 08:19 PM, Sergey Senozhatsky wrote: > On (08/07/17 11:52), Prarit Bhargava wrote: > [..] >> +if (strlen(param) == 1) { >> +/* Preserve legacy boolean settings */ >> +if (!strcmp("0", param) || !strcmp("n", param) || >> +!strcmp("N", par

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-08 Thread Prarit Bhargava
On 08/07/2017 08:19 PM, Sergey Senozhatsky wrote: > On (08/07/17 11:52), Prarit Bhargava wrote: > [..] >> +/** >> + * enum printk_time_type - Timestamp types for printk() messages. >> + * @PRINTK_TIME_DISABLE: No time stamp. >> + * @PRINTK_TIME_LOCAL: Local hardware clock timestamp. >> + * @PRINT

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-08 Thread Peter Zijlstra
On Mon, Aug 07, 2017 at 01:36:39PM -0700, Paul E. McKenney wrote: > On Mon, Aug 07, 2017 at 04:06:09PM -0400, Prarit Bhargava wrote: > > peterz? Want to offer a suggestion? The issue is that I'm changing a bool > > config option to an int and that impacts all the arch's defconfigs. John > > po

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread Sergey Senozhatsky
On (08/07/17 11:52), Prarit Bhargava wrote: [..] > +/** > + * enum printk_time_type - Timestamp types for printk() messages. > + * @PRINTK_TIME_DISABLE: No time stamp. > + * @PRINTK_TIME_LOCAL: Local hardware clock timestamp. > + * @PRINTK_TIME_BOOT: Boottime clock timestamp. > + * @PRINTK_TIME_MON

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread Paul E. McKenney
On Mon, Aug 07, 2017 at 04:06:09PM -0400, Prarit Bhargava wrote: > > > On 08/07/2017 02:47 PM, John Stultz wrote: > > On Mon, Aug 7, 2017 at 11:04 AM, Prarit Bhargava wrote: > >> On 08/07/2017 12:52 PM, John Stultz wrote: > >>> Still not quite following why you're updating all the defconfigs. I'

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread Prarit Bhargava
On 08/07/2017 02:47 PM, John Stultz wrote: > On Mon, Aug 7, 2017 at 11:04 AM, Prarit Bhargava wrote: >> On 08/07/2017 12:52 PM, John Stultz wrote: >>> Still not quite following why you're updating all the defconfigs. I'd >>> make sure the Kconfig default settings are right, and leave updating >>

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread John Stultz
On Mon, Aug 7, 2017 at 11:04 AM, Prarit Bhargava wrote: > On 08/07/2017 12:52 PM, John Stultz wrote: >> Still not quite following why you're updating all the defconfigs. I'd >> make sure the Kconfig default settings are right, and leave updating >> the defconfig to arch/device maintainers. It adds

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread Prarit Bhargava
On 08/07/2017 12:58 PM, Mark Salyzyn wrote: > On 08/07/2017 08:52 AM, Prarit Bhargava wrote: >> diff --git a/arch/arm/configs/aspeed_g4_defconfig >> b/arch/arm/configs/aspeed_g4_defconfig >> index cfc2465e8b77..5f3c50914e92 100644 >> --- a/arch/arm/configs/aspeed_g4_defconfig >> +++ b/arch/arm/co

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread Prarit Bhargava
On 08/07/2017 12:52 PM, John Stultz wrote: > On Mon, Aug 7, 2017 at 8:52 AM, Prarit Bhargava wrote: >> 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 exac

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread Peter Zijlstra
On Mon, Aug 07, 2017 at 11:52:42AM -0400, Prarit Bhargava wrote: > +static u64 printk_get_ts(void) > +{ > + u64 mono, offset_real; > + > + if (printk_time <= PRINTK_TIME_LOCAL) > + return local_clock(); > + > + if (printk_time == PRINTK_TIME_BOOT) > + return ktim

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread Peter Zijlstra
On Mon, Aug 07, 2017 at 09:52:10AM -0700, John Stultz wrote: > On Mon, Aug 7, 2017 at 8:52 AM, Prarit Bhargava wrote: > > +u64 ktime_get_real_log_ts(u64 *offset_real) > > +{ > > + *offset_real = ktime_to_ns(tk_core.timekeeper.offs_real); > > + > > + if (timekeeping_active) > > +

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread Mark Salyzyn
On 08/07/2017 08:52 AM, Prarit Bhargava wrote: diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig index cfc2465e8b77..5f3c50914e92 100644 --- a/arch/arm/configs/aspeed_g4_defconfig +++ b/arch/arm/configs/aspeed_g4_defconfig @@ -162,7 +162,7 @@ CONFIG_JFFS2_F

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread John Stultz
On Mon, Aug 7, 2017 at 8:52 AM, Prarit Bhargava wrote: > 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

[PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 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 i