Skip to content

RFC timekeeping: Missing timekeeping update detection

Frederic Weisbecker lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6sched: Let arch tell us if sched clock is NMI-safearch/Kconfig+5 -00 replies
2/6x86: nsecs to cycles conversionarch/Kconfig arch/x86/Kconfig arch/x86/include/asm/cycles.h +3 more+18 -82 replies
3/6x86: Tell that sched clock is callable in nmiarch/x86/Kconfig+1 -00 replies
4/6seqlock: Add raw_seqbegin() for non-waiting readersinclude/linux/seqlock.h+5 -00 replies
5/6jiffies: Add jiffies_to_nsecsinclude/linux/jiffies.h+6 -00 replies
6/6timekeeping: Debug missing timekeeping updatesinclude/linux/time.h kernel/time/Makefile kernel/time/tick-sched.c +3 more+154 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/6] timekeeping: Missing timekeeping update detection

Hi,

With the timekeeping going to be maintained by full system idle detection patchset from Paul, it seems that the guarantees that enforce timekeeping progression are going to grow in complexity enough to deserve some automated checking.

So here is a proposition in the form of a timekeeping watchdog. It uses periodic NMIs that poll on any suspicious drift between jiffies and a global cpu clock progression.

Thanks.

Frederic Weisbecker (6):
sched: Let arch tell us if sched clock is NMI-safe
x86: nsecs to cycles conversion
x86: Tell that sched clock is callable in nmi
seqlock: Add raw_seqbegin() for non-waiting readers
jiffies: Add jiffies_to_nsecs
timekeeping: Debug missing timekeeping updates

 arch/Kconfig                       |    8 ++
 arch/x86/Kconfig                   |    2 +
 arch/x86/include/asm/cycles.h      |   11 +++
 arch/x86/kernel/apic/hw_nmi.c      |    7 --
 include/linux/jiffies.h            |    6 ++
 include/linux/seqlock.h            |    5 ++
 include/linux/time.h               |   11 +++
 kernel/time/Makefile               |    1 +
 kernel/time/tick-sched.c           |    4 +
 kernel/time/timekeeping.c          |    1 +
 kernel/time/timekeeping_selftest.c |  125 ++++++++++++++++++++++++++++++++++++
 kernel/watchdog.c                  |    3 +-
 lib/Kconfig.debug                  |   13 ++++
 13 files changed, 189 insertions(+), 8 deletions(-)
 create mode 100644 arch/x86/include/asm/cycles.h
 create mode 100644 kernel/time/timekeeping_selftest.c
Signature · 1 line
1.7.5.4