]> www.infradead.org Git - users/jedix/linux-maple.git/commit
clocksource: Check per-CPU clock synchronization when marked unstable
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 21 Dec 2020 23:40:47 +0000 (15:40 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 2 Apr 2021 19:34:35 +0000 (12:34 -0700)
commite5cf7a67dddd4dadbf769c54543440d381e8007d
tree2897dadd286a298d6bc6f85506d32739d2beefbe
parent2d04e16c3a18a8b3c993e7c46844244d983ee18c
clocksource: Check per-CPU clock synchronization when marked unstable

Some sorts of per-CPU clock sources have a history of going out of
synchronization with each other.  However, this problem has purportedy
been solved in the past ten years.  Except that it is all too possible
that the problem has instead simply been made less likely, which might
mean that some of the occasional "Marking clocksource 'tsc' as unstable"
messages might be due to desynchronization.  How would anyone know?

This commit therefore adds CPU-to-CPU synchronization checking
for newly unstable clocksource that are marked with the new
CLOCK_SOURCE_VERIFY_PERCPU flag.  Lists of desynchronized CPUs are
printed, with the caveat that if it is the reporting CPU that is itself
desynchronized, it will appear that all the other clocks are wrong.
Just like in real life.

Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mark Rutland <Mark.Rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Reported-by: Chris Mason <clm@fb.com>
[ paulmck: Add "static" to clocksource_verify_one_cpu() per kernel test robot feedback. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
arch/x86/kernel/kvmclock.c
arch/x86/kernel/tsc.c
include/linux/clocksource.h
kernel/time/clocksource.c