mirror of
https://github.com/torvalds/linux.git
synced 2026-11-23 23:11:40 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user