]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
hrtimer: Avoid re-evaluation when nothing changed
authorThomas Gleixner <tglx@kernel.org>
Tue, 24 Feb 2026 16:38:23 +0000 (17:38 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 27 Feb 2026 15:40:14 +0000 (16:40 +0100)
commitb95c4442b02162904e9012e670b602ebeb3c6c1b
treec0b9daca1bf6eb0b7c97dc4cc09acd79419de459
parent15dd3a9488557d3e6ebcecacab79f4e56b69ab54
hrtimer: Avoid re-evaluation when nothing changed

Most times there is no change between hrtimer_interrupt() deferring the rearm
and the invocation of hrtimer_rearm_deferred(). In those cases it's a pointless
exercise to re-evaluate the next expiring timer.

Cache the required data and use it if nothing changed.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260224163431.338569372@kernel.org
include/linux/hrtimer_defs.h
kernel/time/hrtimer.c