Skip to content

Commit 8aa2acc

Browse files
rostedtfweisbec
authored andcommitted
irq_work: Warn if there's still work on cpu_down
If we are in nohz and there's still irq_work to be done when the idle task is about to go offline, give a nasty warning. Everything should have been flushed from the CPU_DYING notifier already. Further attempts to enqueue an irq_work are buggy because irqs are disabled by __cpu_disable(). The best we can do is to report the issue to the user. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
1 parent c0e980a commit 8aa2acc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎kernel/irq_work.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ bool irq_work_needs_cpu(void)
109109
if (llist_empty(this_list))
110110
return false;
111111

112+
/* All work should have been flushed before going offline */
113+
WARN_ON_ONCE(cpu_is_offline(smp_processor_id()));
114+
112115
return true;
113116
}
114117

0 commit comments

Comments
 (0)