summaryrefslogtreecommitdiff
path: root/lib/timerqueue.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2026-02-24 17:38:18 +0100
committerPeter Zijlstra <peterz@infradead.org>2026-02-27 16:40:14 +0100
commit15dd3a9488557d3e6ebcecacab79f4e56b69ab54 (patch)
tree7f4cfb4c019c6c63e617035e296456dae1b5d15d /lib/timerqueue.c
parentb0a44fa5e2a22ff67752bbc08c651a2efac3e5fe (diff)
hrtimer: Push reprogramming timers into the interrupt return path
Currently hrtimer_interrupt() runs expired timers, which can re-arm themselves, after which it computes the next expiration time and re-programs the hardware. However, things like HRTICK, a highres timer driving preemption, cannot re-arm itself at the point of running, since the next task has not been determined yet. The schedule() in the interrupt return path will switch to the next task, which then causes a new hrtimer to be programmed. This then results in reprogramming the hardware at least twice, once after running the timers, and once upon selecting the new task. Notably, *both* events happen in the interrupt. By pushing the hrtimer reprogram all the way into the interrupt return path, it runs after schedule() picks the new task and the double reprogram can be avoided. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260224163431.273488269@kernel.org
Diffstat (limited to 'lib/timerqueue.c')
0 files changed, 0 insertions, 0 deletions