Skip to content

Commit 9b01f5b

Browse files
committed
nohz: nohz full depends on irq work self IPI support
The nohz full functionality depends on IRQ work to trigger its own interrupts. As it's used to restart the tick, we can't rely on the tick fallback for irq work callbacks, ie: we can't use the tick to restart the tick itself. Lets reject the full dynticks initialization if that arch support isn't available. As a side effect, this makes sure that nohz kick is never called from the tick. That otherwise would result in illegal hrtimer self-cancellation and lockup. Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
1 parent 4327b15 commit 9b01f5b

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎kernel/time/tick-sched.c‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,20 @@ void __init tick_nohz_init(void)
365365
return;
366366
}
367367

368+
/*
369+
* Full dynticks uses irq work to drive the tick rescheduling on safe
370+
* locking contexts. But then we need irq work to raise its own
371+
* interrupts to avoid circular dependency on the tick
372+
*/
373+
if (!arch_irq_work_has_interrupt()) {
374+
pr_warning("NO_HZ: Can't run full dynticks because arch doesn't "
375+
"support irq work self-IPIs\n");
376+
cpumask_clear(tick_nohz_full_mask);
377+
cpumask_copy(housekeeping_mask, cpu_possible_mask);
378+
tick_nohz_full_running = false;
379+
return;
380+
}
381+
368382
cpu = smp_processor_id();
369383

370384
if (cpumask_test_cpu(cpu, tick_nohz_full_mask)) {

0 commit comments

Comments
 (0)