Skip to content

timekeeping: NMI safe timekeeper enhancements

Thomas Gleixner kexec lkml 1 version Applied

Status from this message: The following commit has been merged into the timers/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2timekeeping: Utilize local_clock() for NMI safe timekeeper during early bootkernel/time/timekeeping.c+25 -80 replies
2/2timekeeping: Provide multi-timestamp accessor to NMI safe timekeeperinclude/linux/timekeeping.h kernel/time/timekeeping.c+80 -110 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchPetr Mladek
SeriesT-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [patch 0/2] timekeeping: NMI safe timekeeper enhancements

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

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec