Skip to content

Commit d9b1865

Browse files
Frederic WeisbeckerKAGA-KOKO
authored andcommitted
tick: Assume the tick can't be stopped in NOHZ_MODE_INACTIVE mode
The full-nohz update function checks if the nohz mode is active before proceeding. It considers one exception though: if the tick is already stopped even though the nohz mode is inactive, it still moves on in order to update/restart the tick if needed. However in order for the tick to be stopped, the nohz_mode has to be either NOHZ_MODE_LOWRES or NOHZ_MODE_HIGHRES. Therefore it doesn't make sense to test if the tick is stopped before verifying NOHZ_MODE_INACTIVE mode. Remove the needless related condition. 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-11-frederic@kernel.org
1 parent ef8969b commit d9b1865

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/time/tick-sched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ static void tick_nohz_full_update_tick(struct tick_sched *ts)
10861086
if (!tick_nohz_full_cpu(smp_processor_id()))
10871087
return;
10881088

1089-
if (!ts->tick_stopped && ts->nohz_mode == NOHZ_MODE_INACTIVE)
1089+
if (ts->nohz_mode == NOHZ_MODE_INACTIVE)
10901090
return;
10911091

10921092
__tick_nohz_full_update_tick(ts, ktime_get());

0 commit comments

Comments
 (0)