All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Prarit Bhargava <prarit@redhat.com>,
	Mark Salyzyn <salyzyn@android.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	Orson Zhai <orsonzhai@gmail.com>,
	Changki Kim <changki.kim@samsung.com>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] printk: Store all three timestamps
Date: Thu, 24 Sep 2020 12:37:26 +0200	[thread overview]
Message-ID: <20200924103726.GM6442@alley> (raw)
In-Reply-To: <878sd0m4c3.fsf@jogness.linutronix.de>

On Thu 2020-09-24 02:06:12, John Ogness wrote:
> On 2020-09-23, Petr Mladek <pmladek@suse.com> wrote:
> > diff --git a/kernel/printk/printk_ringbuffer.h b/kernel/printk/printk_ringbuffer.h
> > index 0adaa685d1ca..09082c8472d3 100644
> > --- a/kernel/printk/printk_ringbuffer.h
> > +++ b/kernel/printk/printk_ringbuffer.h
> > @@ -14,7 +15,7 @@
> >   */
> >  struct printk_info {
> >  	u64	seq;		/* sequence number */
> > -	u64	ts_nsec;	/* timestamp in nanoseconds */
> > +	struct ktime_timestamps ts; /* timestamps */
> 
> Until now struct printk_info has contained generic types. If we add
> struct ktime_timestamps, we may start storing more than we need. For
> example, if more (possibly internal) fields are added to struct
> ktime_timestamps that printk doesn't care about. We may prefer to
> generically and explicitly store the information we care about:
> 
>     u64 ts_mono;
>     u64 ts_boot;
>     u64 ts_real;
> 
> Or create our own struct printk_ts to copy the fields of interest to.

I would like to have a structure if we have more timestamps.

Honestly, printk-specific structure sounds like an overhead to me.
How big is the chance that struct ktime_timestamps ts would get
modified? It has been created for printk after all.

That said, I could live with printk-specific structure.
We might even need it if we need to store also local_clock().

Best Regards,
Petr

  reply	other threads:[~2020-09-24 10:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23 13:56 [RFC 0/2] printk: Add more metadata for each record Petr Mladek
2020-09-23 13:56 ` [PATCH 1/2] printk: Store all three timestamps Petr Mladek
2020-09-23 22:12   ` John Ogness
2020-09-24  1:45     ` Sergey Senozhatsky
2020-09-24 11:49     ` Petr Mladek
     [not found]       ` <CAJ-C09hqwOJhSXx1h40q96xhNZFXxP6dUVfjUQZpO4ZhOMZLbQ@mail.gmail.com>
2020-09-25  9:51         ` Petr Mladek
2020-09-24  0:00   ` John Ogness
2020-09-24 10:37     ` Petr Mladek [this message]
2020-09-23 13:56 ` [RFC 2/2] printk: Add more information about the printk caller Petr Mladek
2020-09-24  1:40   ` Sergey Senozhatsky
2020-09-24 11:58     ` Petr Mladek
2020-09-24  2:17   ` Sergey Senozhatsky
2020-09-24  8:23     ` John Ogness
2020-09-24 13:26       ` Petr Mladek
2020-09-24 13:06     ` Petr Mladek
2020-09-24  4:24   ` Ahmed S. Darwish
2020-09-24 12:53     ` Petr Mladek
2020-09-24 13:38       ` Petr Mladek
2020-09-25  0:54         ` Sergey Senozhatsky
2020-09-25 10:20           ` Petr Mladek
2020-10-21 11:48   ` 김창기

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=20200924103726.GM6442@alley \
    --to=pmladek@suse.com \
    --cc=changki.kim@samsung.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=prarit@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=salyzyn@android.com \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=zhang.lyra@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.