Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1732908

Re: [PATCH 3/3 v11] printk: Add monotonic, boottime, and realtime timestamps

From Mark Salyzyn <salyzyn@android.com>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3 v11] printk: Add monotonic, boottime, and realtime timestamps
Date 2017-09-15 16:30 +0200
Message-ID <upZN0-48G-7@gated-at.bofh.it> (permalink)
References <umkQ2-2tt-9@gated-at.bofh.it> <umkQ2-2tt-11@gated-at.bofh.it> <upYQW-3nL-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/15/2017 06:28 AM, Petr Mladek wrote:
> I am still slightly nervous that external tools would need updating.
> Also they might have troubles to interpret the time stamps especially
> when the source is changed at runtime via
> /sys/module/printk/parameters/time.
My comment below is a rehash/summary:

In the discussion, it appears that DAC protection is enough to prevent 
flippant changes. The use cases I can imagine for runtime alteration 
fall in two groups, late boot changes after all disks are mounted and 
the application layers have started; or as an aid to debugging where the 
deliberate nature can be accounted for. Change it, erase the logs is the 
KISS solution, so the tools do not have to 'sniff' the stream for 
dynamic changes, likely getting the 'leader' wrong, checking 
/sys/module/printk/parameters/time for the current/last timebase.

To mitigate the 'leader' issue, or post-mortem/off-machine 
interpretation, really for the debugging corner case IMHO, I had 
proposed that local, and perhaps monotonic, time print as-is as they are 
almost(?) imperceptibly different, but that realtime add a U suffix (to 
denote time is UTC), and that boottime add a B suffix (well, because) so 
that tools can discern. Monotonic could have a M suffix if it is really 
a stickler. This proposal would require more disruptive tool 
modifications and should be scoped as a separate effort. I do expect a 
debate regarding upper and lower case ...

I have a patch waiting in the wings here where disruptive time changes 
(suspend/resume/hibernate/restore; maybe date(1), ntpd(8) or embedded 
systems LTE hardware time updates) will report dual timestamps so that 
resynchronization and tracking can happen in post-mortem on the stream, 
I expect to use the above proposal for the 'second' occasional timestamp.

-- Mark

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 3/3 v11] printk: Add monotonic, boottime, and realtime  timestamps Petr Mladek <pmladek@suse.com> - 2017-09-15 15:30 +0200
  Re: [PATCH 3/3 v11] printk: Add monotonic, boottime, and realtime  timestamps Mark Salyzyn <salyzyn@android.com> - 2017-09-15 16:30 +0200
    Re: [PATCH 3/3 v11] printk: Add monotonic, boottime, and realtime  timestamps Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-09-17 13:00 +0200
      Re: [PATCH 3/3 v11] printk: Add monotonic, boottime, and realtime  timestamps Prarit Bhargava <prarit@redhat.com> - 2017-09-19 14:00 +0200
  Re: [PATCH 3/3 v11] printk: Add monotonic, boottime, and realtime  timestamps Prarit Bhargava <prarit@redhat.com> - 2017-09-15 16:50 +0200

csiph-web