]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
hrtimer: Provide a static branch based hrtimer_hres_enabled()
authorThomas Gleixner <tglx@kernel.org>
Tue, 24 Feb 2026 16:35:42 +0000 (17:35 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 27 Feb 2026 15:40:04 +0000 (16:40 +0100)
commit0a93d30861617ecf207dcc4c6c736435fac36dae
tree0f4a976d147de5687b07f04616fae29dc10217ea
parentd19ff16c11db38f3ee179d72751fb9b340174330
hrtimer: Provide a static branch based hrtimer_hres_enabled()

The scheduler evaluates this via hrtimer_is_hres_active() every time it has
to update HRTICK. This needs to follow three pointers, which is expensive.

Provide a static branch based mechanism to avoid that.

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