* [PATCH timers/core v1] clocksource: Align clocksource watchdog constraints with Kconfig value
@ 2026-03-13 14:29 Connor Williamson
2026-03-20 16:58 ` Thomas Gleixner
0 siblings, 1 reply; 4+ messages in thread
From: Connor Williamson @ 2026-03-13 14:29 UTC (permalink / raw)
To: jstultz, tglx, sboyd; +Cc: linux-kernel, nh-open-source, paulmck, connordw
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.
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")'
Signed-off-by: Connor Williamson <connordw@amazon.com>
---
kernel/time/clocksource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index e753a0632ac8..bd4aea8db2de 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -137,7 +137,7 @@ static u64 suspend_start;
#ifdef CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US
#define MAX_SKEW_USEC CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US
#else
-#define MAX_SKEW_USEC (125 * WATCHDOG_INTERVAL / HZ)
+#define MAX_SKEW_USEC 125
#endif
/*
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH timers/core v1] clocksource: Align clocksource watchdog constraints with Kconfig value
2026-03-13 14:29 [PATCH timers/core v1] clocksource: Align clocksource watchdog constraints with Kconfig value Connor Williamson
@ 2026-03-20 16:58 ` Thomas Gleixner
2026-03-23 13:28 ` connordw
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2026-03-20 16:58 UTC (permalink / raw)
To: Connor Williamson, jstultz, sboyd
Cc: linux-kernel, nh-open-source, paulmck, connordw
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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH timers/core v1] clocksource: Align clocksource watchdog constraints with Kconfig value
2026-03-20 16:58 ` Thomas Gleixner
@ 2026-03-23 13:28 ` connordw
2026-03-23 19:59 ` Thomas Gleixner
0 siblings, 1 reply; 4+ messages in thread
From: connordw @ 2026-03-23 13:28 UTC (permalink / raw)
To: tglx; +Cc: connordw, jstultz, linux-kernel, nh-open-source, paulmck, sboyd
On Fri, Mar 20 2026 at 17:58 (+0100), Thomas Gleixner wrote:
> 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
Please withdraw my patch. Thanks for your response, I wasn't aware that
despite cs->uncertainty_margin being set when CLOCKSOURCE_WATCHDOG=n it
wasn't subsequently being read anywhere upstream. Since this logic will be
removed in v7.1 anyway this patch is indeed pointless.
Apologies for the noise,
Connor
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH timers/core v1] clocksource: Align clocksource watchdog constraints with Kconfig value
2026-03-23 13:28 ` connordw
@ 2026-03-23 19:59 ` Thomas Gleixner
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2026-03-23 19:59 UTC (permalink / raw)
To: connordw; +Cc: connordw, jstultz, linux-kernel, nh-open-source, paulmck, sboyd
On Mon, Mar 23 2026 at 13:28, connordw@amazon.com wrote:
> On Fri, Mar 20 2026 at 17:58 (+0100), Thomas Gleixner wrote:
>> 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
>
> Please withdraw my patch. Thanks for your response, I wasn't aware that
> despite cs->uncertainty_margin being set when CLOCKSOURCE_WATCHDOG=n it
> wasn't subsequently being read anywhere upstream. Since this logic will be
> removed in v7.1 anyway this patch is indeed pointless.
>
> Apologies for the noise,
Nothing to apologize for.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-23 19:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-13 14:29 [PATCH timers/core v1] clocksource: Align clocksource watchdog constraints with Kconfig value Connor Williamson
2026-03-20 16:58 ` Thomas Gleixner
2026-03-23 13:28 ` connordw
2026-03-23 19:59 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox