[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1711150001190.2221@nanos>
Date: Wed, 15 Nov 2017 00:04:18 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Linus Torvalds <torvalds@...ux-foundation.org>
cc: Mark Salyzyn <salyzyn@...roid.com>, 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 Tue, 14 Nov 2017, Linus Torvalds wrote:
> On Tue, Nov 14, 2017 at 2:50 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> >
> > Something like the untested patch below should do the storage and converts
> > the primary timestamp from local_clock() to clock monotonic.
>
> This may work.
>
> > - u64 ts_nsec; /* timestamp in nanoseconds */
> > + /* Timestamps in nanoseconds */
> > + union {
> > + u64 ts_nsec;
> > + struct timestamps ts;
> > + };
>
> But I'd skip the union, and just search-and-replace the ts_nsec ->
> ts.mono. You did that in at least one place anyway.
>
> Because as it is, that's just too subtle and hard to read. Don't make
> it worse by having a magical "ts_nsec is also ts.mono, but you have to
> look in two different files to see that.
>
> That file is messy enough as-is.
True. I already replaced all of them except this one:
@@ -1022,6 +1026,7 @@ void log_buf_vmcoreinfo_setup(void)
*/
VMCOREINFO_STRUCT_SIZE(printk_log);
VMCOREINFO_OFFSET(printk_log, ts_nsec);
+ VMCOREINFO_OFFSET(printk_log, ts);
VMCOREINFO_OFFSET(printk_log, len);
VMCOREINFO_OFFSET(printk_log, text_len);
VMCOREINFO_OFFSET(printk_log, dict_len);
If I remove ts_nsec completely, then the VMCORE info changes and that would
break existing tools because they search for ts_nsec and fail....
Thanks,
tglx
Powered by blists - more mailing lists