[PATCH RFC clocksource] Do not mark clocks unstable due to delays

From: Paul E. McKenney
Date: Tue Jan 05 2021 - 19:41:59 EST


Hello!

If there is a sufficient delay between reading the watchdog clock and the
clock under test, the clock under test will be marked unstable through no
fault of its own. This series checks for this, doing limited retries
to get a good set of clock reads. If the clock is marked unstable
and is marked as being per-CPU, cross-CPU synchronization is checked.
This series also provides delay injection, which may be enabled via
kernel boot parameters to test the checking for delays.

1. Provide module parameters to inject delays in watchdog.

2. Retry clock read if long delays detected.

3. Check per-CPU clock synchronization when marked unstable.

4. Provide a module parameter to fuzz per-CPU clock checking.

5. Do pairwise clock-desynchronization checking.

Thanx, Paul

------------------------------------------------------------------------

Documentation/admin-guide/kernel-parameters.txt | 31 ++++
arch/x86/kernel/kvmclock.c | 2
arch/x86/kernel/tsc.c | 3
include/linux/clocksource.h | 2
kernel/time/clocksource.c | 176 +++++++++++++++++++++---
5 files changed, 189 insertions(+), 25 deletions(-)