public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 0/2] timekeeping: NMI safe timekeeper enhancements
@ 2020-08-14 10:19 Thomas Gleixner
  2020-08-14 10:19 ` [patch 1/2] timekeeping: Utilize local_clock() for NMI safe timekeeper during early boot Thomas Gleixner
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Thomas Gleixner @ 2020-08-14 10:19 UTC (permalink / raw)
  To: LKML
  Cc: Petr Mladek, Peter Zijlstra, Orson Zhai, Prarit Bhargava,
	Dave Young, Baoquan He, Vivek Goyal, Sergey Senozhatsky,
	Steven Rostedt, John Stultz, Stephen Boyd, kexec

printk intends to store various timestamps (MONOTONIC, REALTIME, BOOTTIME)
to make correlation of dmesg accross different machines easier.

The NMI safe timekeeper allows to retrieve these timestamps from any
context, but it lacks a few things:

  1) The nmi safe accessors are not providing time stamps until timekeeping
     is initialized during early boot.

     This can be mitigated by using sched clock up to the point where time-
     keeping becomes available. This has no side effects because clock
     monotonic takes sched clock into account at initialization time
     anyway. So no random time jumps are possible.

     If early sched clock is not available then there is no difference
     either, obviously. Both return 0.

  2) It requires a new accessor which allows to retrieve all three clock
     timestamps in one go.

     Trivial excercise. But there are a few twists:

     A) Access to boot time can be racy if the sleep time offset on resume
     	is injected after timekeeping resume. That's the case when the RTC
     	or whatever is used to calculate sleep time is not availble when
	the timekeeping core is resumed.

     B) Timestamps are frozen accross the very inner low level
     	suspend/resume path. Not a big problem, but might affect the
     	developer debug printks.

     A detailed description of these two points is in the changelog of
     patch 2.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-08-23  8:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-14 10:19 [patch 0/2] timekeeping: NMI safe timekeeper enhancements Thomas Gleixner
2020-08-14 10:19 ` [patch 1/2] timekeeping: Utilize local_clock() for NMI safe timekeeper during early boot Thomas Gleixner
2020-08-23  8:40   ` [tip: timers/core] " tip-bot2 for Thomas Gleixner
2020-08-14 10:19 ` [patch 2/2] timekeeping: Provide multi-timestamp accessor to NMI safe timekeeper Thomas Gleixner
2020-08-23  8:40   ` [tip: timers/core] " tip-bot2 for Thomas Gleixner
2020-08-20  8:47 ` [patch 0/2] timekeeping: NMI safe timekeeper enhancements Petr Mladek
2020-08-20 10:30   ` Thomas Gleixner
2020-08-20 10:43     ` Petr Mladek
2020-08-23  8:43       ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox