Skip to content

RFC Increased clocksource validation and cleanups (v2)

John Stultz lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest12 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12clocksource: Simplify clocks_calc_max_nsecs logickernel/time/clocksource.c+3 -120 replies
2/12clocksource: Simplify logic around clocksource wrapping saftey marginskernel/time/clocksource.c kernel/time/sched_clock.c+14 -160 replies
3/12clocksource: Remove clocksource_max_deferment()kernel/time/clocksource.c+4 -160 replies
4/12clocksource: Add max_cycles to clocksource structureinclude/linux/clocksource.h kernel/time/clocksource.c kernel/time/sched_clock.c+17 -60 replies
5/12time: Add debugging checks to warn if we see delayskernel/time/jiffies.c kernel/time/timekeeping.c lib/Kconfig.debug+36 -01 reply
6/12time: Add infrastructure to cap clocksource reads to the max_cycles valuekernel/time/timekeeping.c+27 -122 replies
7/12time: Try to catch clocksource delta underflowskernel/time/timekeeping.c+7 -00 replies
8/12time: Add warnings when overflows or underflows are observedkernel/time/timekeeping.c+51 -71 reply
9/12clocksource: Improve clocksource watchdog reportingkernel/time/clocksource.c+12 -90 replies
10/12clocksource: Mostly kill clocksource_register()arch/s390/kernel/time.c arch/sparc/kernel/time_32.c include/linux/clocksource.h +2 more+47 -540 replies
11/12sparc: Convert to using clocksource_register_hz()arch/sparc/kernel/time_32.c+1 -51 reply
12/12clocksource: Add some debug info about clocksources being registeredkernel/time/clocksource.c+4 -00 replies

Reviews trailers per patch

3 of 12 patches have a Reviewed-by or Acked-by.

PatchStephen BoydRichard CochranDavid S. Miller
1/12
2/12A-b
3/12
4/12
5/12
6/12A-b
7/12
8/12
9/12
10/12
11/12A-b
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/12][RFC] Increased clocksource validation and cleanups (v2)

So here's another round for this series, which is the result of earlier discussions with Linus and his suggestions around improvements to clocksource validation in the hope we can more easily catch bad hardware.

There's also a few cleanups Linus suggested as well as a few I've been meaning to get to for awhile.

I tried in address all the feedback that had been given, adding the checks behind CONFIG_DEBUG_TIMEKEEPING. I also sorted out a sane way to print rate-limited warnings if we see cycle deltas that are too large, or if they look like small underflows.

Let me know what you think. I'm still a bit hesitant to queue any of this for 3.20 (particularly the last few cleanups), but if there aren't many more objections I might see if it can still make it.

thanks
-john

Cc Dave Jones <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Richard Cochran <[email protected]>
Cc Prarit Bhargava <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Peter Zijlstra <[email protected]>

John Stultz (12):
clocksource: Simplify clocks_calc_max_nsecs logic
clocksource: Simplify logic around clocksource wrapping saftey margins
clocksource: Remove clocksource_max_deferment()
clocksource: Add max_cycles to clocksource structure
time: Add debugging checks to warn if we see delays
time: Add infrastructure to cap clocksource reads to the max_cycles
value
time: Try to catch clocksource delta underflows
time: Add warnings when overflows or underflows are observed
clocksource: Improve clocksource watchdog reporting
clocksource: Mostly kill clocksource_register()
sparc: Convert to using clocksource_register_hz()
clocksource: Add some debug info about clocksources being registered

 arch/s390/kernel/time.c     |   2 +-
 arch/sparc/kernel/time_32.c |   6 +-
 include/linux/clocksource.h |  16 ++++-
 kernel/time/clocksource.c   | 164 +++++++++++++++++++-------------------------
 kernel/time/jiffies.c       |   5 +-
 kernel/time/sched_clock.c   |   6 +-
 kernel/time/timekeeping.c   | 113 ++++++++++++++++++++++++++----
 lib/Kconfig.debug           |  12 ++++
 8 files changed, 205 insertions(+), 119 deletions(-)
Signature · 1 line
1.9.1