Skip to content

Commit 89f01e1

Browse files
anna-marialxKAGA-KOKO
authored andcommitted
timers: Check if timers base is handled already
Due to the conversion of the NOHZ timer placement to a pull at expiry time model, the per CPU timer bases with non pinned timers are no longer handled only by the local CPU. In case a remote CPU already expires the non pinned timers base of the local CPU, nothing more needs to be done by the local CPU. A check at the begin of the expire timers routine is required, because timer base lock is dropped before executing the timer callback function. This is a preparatory work, but has no functional impact right now. Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20240221090548.36600-16-anna-maria@linutronix.de
1 parent 90f5df6 commit 89f01e1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/time/timer.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,6 +2285,9 @@ static inline void __run_timers(struct timer_base *base)
22852285

22862286
lockdep_assert_held(&base->lock);
22872287

2288+
if (base->running_timer)
2289+
return;
2290+
22882291
while (time_after_eq(jiffies, base->clk) &&
22892292
time_after_eq(jiffies, base->next_expiry)) {
22902293
levels = collect_expired_timers(base, heads);

0 commit comments

Comments
 (0)