clocksource: Loosen clocksource watchdog constraints
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 7 Dec 2022 03:36:10 +0000 (19:36 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 4 Jan 2023 04:43:45 +0000 (20:43 -0800)
commitc37e85c135cead4256dc8860073c468d8925c3df
treed7871da13c5a39e5adff5a455935260f5502c48a
parentbeaa1ffe551c330d8ea23de158432ecaad6c0410
clocksource: Loosen clocksource watchdog constraints

Currently, MAX_SKEW_USEC is set to 100 microseconds, which has worked
reasonably well.  However, NTP is willing to tolerate 500 microseconds
of skew per second, and a clocksource that is good enough for NTP should
be good enough for the clocksource watchdog.  The watchdog's skew is
controlled by MAX_SKEW_USEC and the CLOCKSOURCE_WATCHDOG_MAX_SKEW_US
Kconfig option.  However, these values are doubled before being associated
with a clocksource's ->uncertainty_margin, and the ->uncertainty_margin
values of the pair of clocksource's being compared are summed before
checking against the skew.

Therefore, set both MAX_SKEW_USEC and the default for the
CLOCKSOURCE_WATCHDOG_MAX_SKEW_US Kconfig option to 125 microseconds of
skew per second, resulting in 500 microseconds of skew per second in
the clocksource watchdog's skew comparison.

Suggested-by Rik van Riel <riel@surriel.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/time/Kconfig
kernel/time/clocksource.c