[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7f0e0165-2b22-f2cf-ce6e-8db3d7325973@android.com>
Date: Tue, 14 Nov 2017 14:10:30 -0800
From: Mark Salyzyn <salyzyn@...roid.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Petr Mladek <pmladek@...e.com>,
LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Prarit Bhargava <prarit@...hat.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [GIT pull] printk updates for 4.15
On 11/14/2017 01:29 PM, Linus Torvalds wrote:
> And then maybe you can send a single patch that changes *ONLY*
> print_time(), with an explanation of how Android uses
> CONFIG_PRINTK_TIME and would like that to be realtime instead of the
> monotonic clock that we traditionally use.
I would be pleased to be educated.
print_time() uses msg->ts_nsec; and AFAIK that needs to be in reference
to the timebase. You can not after the fact acquire the correct
synchronization and corrections between boottime and localtime/monotonic
for example, it has to be landed at point of logging, not reconstructed
at time of printing?
[TL;DR]
We would need to land the at-time-of-logging correction factor(s) for
the timebase for each logged entry for print_time() to provide a correct
fixed value when dumped. eg I would also need these values handy in the
msg structure:
tk->xtime_sec;
tk->wall_to_monotonic->tv_sec
tk->wall_to_monotonic->tv_nsec
tk->raw_time.tv_sec;
tk->raw_time.tv_nsec
tk->tkr_raw.shift
tk->tkr_raw.xtime_nsec;
tk->tkr_raw.mult;
rk->tkr_raw.shift
tk->tkr_mono.xtime_nsec
tk->tkr_mono.xtime_nsec;
tk->tkr_mono.mult;
tk->tkr_mono.shift;
tk->tkr_mono.mask;
tk->tkr_mono.cycle_last;
tk->offs_boot;
(or live with it your way, klogd grabbing the 'relatively correct'
entries ASAP, but then dmesg output will differ)
Having a periodic message with a hint for correction factors helps
(which we have used in a prototype dmesg tool), but drift puts us in the
ms region (which I was satisfied with, but some of our partners were
not) when they would have liked us (or ns) time precision.
For Android, periodic correction prints at time disruptions is good
enough, I am merely advocating for some of the partners needs.
-- Mark
Powered by blists - more mailing lists