hrtimer: Avoid pointless reprogramming in __hrtimer_start_range_ns()

Much like hrtimer_reprogram(), skip programming if the cpu_base is running
the hrtimer interrupt.

Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Juri Lelli <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
Link: https://patch.msgid.link/[email protected]
This commit is contained in:
Peter Zijlstra
2026-02-27 16:40:04 +01:00
parent d70c1080a9
commit d19ff16c11
+8
View File
@@ -1269,6 +1269,14 @@ static int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
}
first = enqueue_hrtimer(timer, new_base, mode);
/*
* If the hrtimer interrupt is running, then it will reevaluate the
* clock bases and reprogram the clock event device.
*/
if (new_base->cpu_base->in_hrtirq)
return false;
if (!force_local) {
/*
* If the current CPU base is online, then the timer is