Re: [PATCH timers/core v1] clocksource: Align clocksource watchdog constraints with Kconfig value
From: Thomas Gleixner
Date: Fri Mar 20 2026 - 13:08:54 EST
On Fri, Mar 13 2026 at 14:29, Connor Williamson wrote:
> A previous patch intended to update both MAX_SKEW_USEC and
> CLOCKSOURCE_WATCHDOG_MAX_SKEW_US to 125 microseconds, resulting in a
> total tolerable skew per second of 500 microseconds as this value is
> doubled prior to being associated with the uncertainty_margin of a
> clocksource, and the uncertainty_margin values of two clocksources being
> compared are then summed before comparison to the skew.
>
> However, the default value of MAX_SKEW_USEC in the absence of the
> Kconfig option was defined as (125 * WATCHDOG_INTERVAL / HZ), which is
> (125 * (HZ >> 1)) / HZ, effectively ~ 125/2 microseconds, while
> CLOCKSOURCE_WATCHDOG_MAX_SKEW_US was set to 125 microseconds as
> intended.
Q: How does that matter?
A: Not at all.
CLOCKSOURCE_WATCHDOG_MAX_SKEW_US is always defined when
CLOCKSOURCE_WATCHDOG=y.
IOW, the #else path is simply dead code.
> Therefore, align MAX_SKEW_USEC with CLOCKSOURCE_WATCHDOG_MAX_SKEW_US,
> setting it to the intended default value of 125 microseconds.
>
> 'Fixes: c37e85c135ce ("clocksource: Loosen clocksource watchdog
> constraints")'
Bogus format for the Fixes tag. Please read and follow
Documentation. It's there for a reason.
But that doesn't matter much because this patch fixes clearly nothing.
The only valid "fix" is to delete the dead code and not to polish it,
but that's pretty moot as it is harmless and already scheduled for
removal in 7.1 due to:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=timers/core
Thanks,
tglx