Skip to content

Commit f7ea0fd

Browse files
committed
tick: Don't invoke tick_nohz_stop_sched_tick() if the cpu is offline
commit 5b39939 (nohz: Move ts->idle_calls incrementation into strict idle logic) moved code out of tick_nohz_stop_sched_tick() and missed to bail out when the cpu is offline. That's causing subsequent failures as an offline CPU is supposed to die and not to fiddle with nohz magic. Return false in can_stop_idle_tick() if the cpu is offline. Reported-and-tested-by: Jiri Kosina <jkosina@suse.cz> Reported-and-tested-by: Prarit Bhargava <prarit@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Tony Luck <tony.luck@intel.com> Cc: x86@kernel.org Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1305132138160.2863@ionos Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent 4b0c0f2 commit f7ea0fd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/time/tick-sched.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
469469
if (unlikely(!cpu_online(cpu))) {
470470
if (cpu == tick_do_timer_cpu)
471471
tick_do_timer_cpu = TICK_DO_TIMER_NONE;
472+
return false;
472473
}
473474

474475
if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE))

0 commit comments

Comments
 (0)