tick: Split nohz and highres features from nohz_mode
authorFrederic Weisbecker <frederic@kernel.org>
Sun, 25 Feb 2024 22:55:05 +0000 (23:55 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 26 Feb 2024 10:37:32 +0000 (11:37 +0100)
commit7988e5ae2be70b110db9d4b8ec163bd42e67d3be
tree38186d6bd25835131a681283c62319361205540c
parenta478ffb2ae234ee1ece2b84719762c54d304e2c7
tick: Split nohz and highres features from nohz_mode

The nohz mode field tells about low resolution nohz mode or high
resolution nohz mode but it doesn't tell about high resolution non-nohz
mode.

In order to retrieve the latter state, tick_cancel_sched_timer() must
fiddle with struct hrtimer's internals to guess if the tick has been
initialized in high resolution.

Move instead the nohz mode field information into the tick flags and
provide two new bits: one to know if the tick is in nohz mode and
another one to know if the tick is in high resolution. The combination
of those two flags provides all the needed informations to determine
which of the three tick modes is running.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240225225508.11587-14-frederic@kernel.org
kernel/time/hrtimer.c
kernel/time/tick-sched.c
kernel/time/tick-sched.h
kernel/time/timer_list.c