Linux Power Management development
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Mark Salyzyn <salyzyn@android.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	rjw@rjwysocki.net, len.brown@intel.com, pavel@ucw.cz,
	linux-pm@vger.kernel.org, a.zummo@towertech.it,
	alexandre.belloni@free-electrons.com, linux-rtc@vger.kernel.org,
	andy.shevchenko@gmail.com, Mark Salyzyn <salyzyn@google.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Thierry Strudel <tstrudel@google.com>,
	John Stultz <john.stultz@linaro.org>,
	Richard Cochran <richardcochran@gmail.com>,
	Nicolas Pitre <nicolas.pitre@linaro.org>,
	Kees Cook <keescook@chromium.org>, Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Prarit Bhargava <prarit@redhat.com>
Subject: Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg)
Date: Wed, 19 Jul 2017 09:23:25 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1707190913500.2286@nanos> (raw)
In-Reply-To: <5016ccc4-7faa-b61e-c0a1-b851620849c7@android.com>

On Tue, 18 Jul 2017, Mark Salyzyn wrote:
> On 07/18/2017 03:35 PM, Thomas Gleixner wrote:
> > There was some discussion about making the clock source for dmesg time
> > stamps selectable, so you can use MONOTONIC, REALTIME, BOOTTIME. The
> > patches looked sensible, but there was some showstopper vs. the user space
> > dmesg utility. See:
> 
> The timestamps are useful for the 'second' purpose of these patches when
> dmesg time is BOOTTIME or MONOTONIC, and can be turned off if REALTIME
> is selected. Having rtc_show_time a single point for switching this no doubt
> helps,
> not hinders, that dmesg issue.
> 
> The inflection points would still serve a purpose, still need
> suspend/resume/hibernate/restore. The reboot messages are _only_ useful to
> us with their timestamps, as I checked and the only tools that use those are
> for log synchronization. We may be able to do away with them on REALTIME
> dmesg'ing; but the standardization of the message as a marker would have a
> legacy purpose (!)
> 
> NB: We have a similar configuration for the user space logger, which can be
> configured to report in MONOTONIC time. We have yet to have a vendor
> use the feature, opting for REALTIME logging for user space activities.
> Our klogd (which runs at background priority and is batched) manages a
> histogram relationship between MONOTONIC and REALTIME helped by these
> prints and incorporates the REALTIME dmesg logs merged into our user
> space logging database.

There is another option to remedy this and the dmesg tooling issues:

Instead of switching the time stamps in dmesg to a different clock we might
as well have an optional secondary timestamp. So instead of:

 [  341.590930] wlan0: associated

you would get:

 [  341.590930] [ sec.usec] wlan0: associated

where the second time stamp would be CLOCK_REALTIME/BOOTTIME.

That should also solve Prarits problem, hmm?

Thanks,

	tglx

  reply	other threads:[~2017-07-19  7:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18 21:19 [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg) Mark Salyzyn
2017-07-18 21:52 ` Thomas Gleixner
2017-07-18 22:06   ` Mark Salyzyn
2017-07-18 22:35     ` Thomas Gleixner
2017-07-18 23:25       ` Mark Salyzyn
2017-07-19  7:23         ` Thomas Gleixner [this message]
2017-07-19 12:03           ` Prarit Bhargava
2017-07-19 12:28             ` Thomas Gleixner
2017-07-19 14:28               ` Prarit Bhargava
2017-07-19 18:13             ` Mark Salyzyn
2017-07-20  8:20     ` Pavel Machek

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.1707190913500.2286@nanos \
    --to=tglx@linutronix.de \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=john.stultz@linaro.org \
    --cc=keescook@chromium.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=prarit@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=rjw@rjwysocki.net \
    --cc=salyzyn@android.com \
    --cc=salyzyn@google.com \
    --cc=tstrudel@google.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