From: Petr Mladek <pmladek@suse.com>
To: Mark Salyzyn <salyzyn@android.com>
Cc: John Ogness <john.ogness@linutronix.de>,
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>,
Chunyan Zhang <zhang.lyra@gmail.com>,
Orson Zhai <orsonzhai@gmail.com>,
Changki Kim <changki.kim@samsung.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] printk: Store all three timestamps
Date: Fri, 25 Sep 2020 11:51:21 +0200 [thread overview]
Message-ID: <20200925095121.GN29288@alley> (raw)
In-Reply-To: <CAJ-C09hqwOJhSXx1h40q96xhNZFXxP6dUVfjUQZpO4ZhOMZLbQ@mail.gmail.com>
On Thu 2020-09-24 10:07:57, Mark Salyzyn wrote:
> I would hope for monotonic_raw, boottime and realtime as being the most
> useful for most situations.
>
> [TL;DR]
>
> Currently kernel logs actually uses monotonic_raw (no timing clock
> correction), not monotonic (timing correction).
>
> Whereas boot (timing clock adjusted, still monotonic) and realtime (timing
> clock _and_ time adjusted, non monotonic), when we try to correlate to user
> space is workable, but we will have troubles correlating monotonic (w.r.t.
> monotonic_raw) clocks if used in user space.
>
> In Android we have the option of monotonic and realtime only right now for
> the user space logger (which integrates logd, klogd and auditd, the later
> two come from the kernel). I have bugs open to consider boottime, but it is
> blocked on boottime availability from kernel space logging (this change). I
> have another bug to consider switching the logger to monotonic_raw instead
> of monotonic, to make it correlate better with existing kernel logs. But
> alas a lot of resistance for phones switching to monotonic(_raw), the only
> devices that chose monotonic(_raw) is everything else (google glass,
> watches, ...). As such, phones, and the associated developers, will
> continue to want realtime correlated in the kernel logs (yes, this change
> too).
>
> realtime sucks for the first 10 seconds on Android, since phones generally
> do not get their time correction until then from network resources, and
> many of their rtc clocks are not adjustable, they store a correction factor
> that does not get picked up from user space until userdata is mounted
> (about 20 seconds in). But only kernel developers care about this first
> part of boot, everything after that (and associated correlated kernel
> interactions) are for user space folks.
Thanks a lot for this detailed feedback.
Just to be sure that I understand it correctly. You suggest to store
three timestamps: local_clock(), boot and real clock.
It makes sense to me. I just wonder if there might be any use case
when the adjusted mono clock is needed or preferred over local_clock().
Best Regards,
Petr
next prev parent reply other threads:[~2020-09-25 9:51 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 [this message]
2020-09-24 0:00 ` John Ogness
2020-09-24 10:37 ` Petr Mladek
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=20200925095121.GN29288@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).