* [PATCH] hrtimer: Retrigger local timers after clock changes
@ 2026-11-01 14:15 Avi Weiss
0 siblings, 0 replies; only message in thread
From: Avi Weiss @ 2026-11-01 14:15 UTC (permalink / raw)
To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner
Cc: Marcelo Tosatti, linux-kernel, Avi Weiss
clock_was_set() selects CPUs whose hrtimer deadlines move earlier
after a clock change. smp_call_function_many() excludes the calling
CPU even when it is in the mask, leaving its clock event programmed
for the old deadline. An overdue realtime timer can then expire
only when a later event triggers timer handling.
Use on_each_cpu_mask() to retrigger the local CPU when selected,
without interrupting CPUs with unaffected deadlines.
Fixes: 81d741d3460c ("hrtimer: Avoid unnecessary SMP function calls in clock_was_set()")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
kernel/time/hrtimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 17dd38a6cee7..3133d7403a74 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1000,7 +1000,7 @@ void clock_was_set(unsigned int bases)
cpumask_set_cpu(cpu, mask);
}
scoped_guard(preempt)
- smp_call_function_many(mask, retrigger_next_event, NULL, 1);
+ on_each_cpu_mask(mask, retrigger_next_event, NULL, 1);
}
free_cpumask_var(mask);
base-commit: d135ab453a7400a34930bdda1ef4bdc8acfac80e
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-01 14:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-01 14:15 [PATCH] hrtimer: Retrigger local timers after clock changes Avi Weiss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®