From: Thomas Gleixner <tglx@linutronix.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Salyzyn <salyzyn@android.com>,
Petr Mladek <pmladek@suse.com>,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Prarit Bhargava <prarit@redhat.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [GIT pull] printk updates for 4.15
Date: Wed, 15 Nov 2017 00:22:45 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1711150022000.2221@nanos> (raw)
In-Reply-To: <CA+55aFz-VvPBoW0RvDW4eN5YhwaUzcMvsYzrqEC41QdfOdiF4Q@mail.gmail.com>
On Tue, 14 Nov 2017, Linus Torvalds wrote:
> On Tue, Nov 14, 2017 at 3:04 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > 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....
>
> Dear god, that's nasty.
>
> I agree that the vmcore info name probably needs to be retained, but
> maybe we could just do that with
>
> #define VMCOREINFO_FIELD_AND_OFFSET(name, field, offset) \
> vmcoreinfo_append_str("OFFSET(%s.%s)=%lu\n", name, field, offset)
>
> and then do
>
> #define VMCOREINFO_OFFSET(name, field) \
> VMCOREINFO_FIELD_AND_OFFSET(#name, #field, \
> (unsigned long)offsetof(struct name, offset))
>
> and for that ts_nsec you can then do
>
> /* ts.mono used to be called "ts_nsec" */
> VMCOREINFO_FIELD_AND_OFFSET("printk_log", "ts_nsec",
> (unsigned long)offsetof(struct printk_log, ts.mono))
>
> or something.
>
> And I may obviously have messed that all up, I wrote it all in the
> email client, so it's more pseudo-code than anything else.
>
> But it looks pretty straight-forward conceptually, and would make it
> pretty clear what is going on, no?
That should work. I'll try that tomorrow with brain awake.
Thanks,
tglx
next prev parent reply other threads:[~2017-11-14 23:22 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 9:36 Thomas Gleixner
2017-11-14 1:18 ` Linus Torvalds
2017-11-14 2:48 ` Linus Torvalds
2017-11-14 10:03 ` Petr Mladek
2017-11-14 13:28 ` Prarit Bhargava
2017-11-14 15:56 ` Mark Salyzyn
2017-11-15 0:48 ` Sergey Senozhatsky
2017-11-14 17:20 ` Linus Torvalds
2017-11-14 20:21 ` Thomas Gleixner
2017-11-14 21:07 ` Linus Torvalds
2017-11-14 21:09 ` Thomas Gleixner
2017-11-14 21:16 ` Mark Salyzyn
2017-11-14 21:29 ` Linus Torvalds
2017-11-14 22:10 ` Mark Salyzyn
2017-11-14 22:37 ` Linus Torvalds
2017-11-14 22:50 ` Thomas Gleixner
2017-11-14 23:00 ` Joe Perches
2017-11-14 23:00 ` Linus Torvalds
2017-11-14 23:04 ` Thomas Gleixner
2017-11-14 23:18 ` Linus Torvalds
2017-11-14 23:22 ` Thomas Gleixner [this message]
2017-11-15 0:00 ` Linus Torvalds
2017-11-15 8:04 ` Ingo Molnar
2017-11-15 16:26 ` Mark Salyzyn
2017-11-15 17:42 ` Linus Torvalds
2017-11-16 0:37 ` Thomas Gleixner
2017-11-16 1:23 ` John Stultz
2017-11-16 1:32 ` Linus Torvalds
2017-11-16 7:12 ` Thomas Gleixner
2017-11-18 0:26 ` Thomas Gleixner
2017-11-18 0:44 ` Linus Torvalds
2017-11-18 1:00 ` Thomas Gleixner
2017-11-20 6:20 ` Kevin Easton
2017-11-20 6:36 ` Linus Torvalds
2018-01-29 20:34 ` Mark Salyzyn
2018-01-29 21:49 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1711150022000.2221@nanos \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=prarit@redhat.com \
--cc=rostedt@goodmis.org \
--cc=salyzyn@android.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®