Skip to content

Commit

Permalink
lib/irq_poll: Declare IRQ_POLL softirq vector as ksoftirqd-parking safe
Browse files Browse the repository at this point in the history
The following warning may appear while setting a CPU down:

	NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #20!!!

The IRQ_POLL_SOFTIRQ vector can be raised during the hotplug cpu_down()
path after ksoftirqd is parked and before the CPU actually dies. However
this is handled afterward at the CPUHP_IRQ_POLL_DEAD stage where the
queue gets migrated.

Hence this warning can be considered spurious and the vector can join
the "hotplug-safe" list.

Reported-and-tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>
  • Loading branch information
Frederic Weisbecker committed Mar 7, 2022
1 parent 0345691 commit f96272a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions include/linux/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -580,12 +580,15 @@ enum
};

/*
* Ignoring the RCU vector after ksoftirqd is parked is fine
* because:
* 1) rcutree_migrate_callbacks() takes care of the queue.
* The following vectors can be safely ignored after ksoftirqd is parked:
*
* _ RCU:
* 1) rcutree_migrate_callbacks() migrates the queue.
* 2) rcu_report_dead() reports the final quiescent states.
*
* _ IRQ_POLL: irq_poll_cpu_dead() migrates the queue
*/
#define SOFTIRQ_HOTPLUG_SAFE_MASK (BIT(RCU_SOFTIRQ))
#define SOFTIRQ_HOTPLUG_SAFE_MASK (BIT(RCU_SOFTIRQ) | BIT(IRQ_POLL_SOFTIRQ))

/* map softirq index to softirq name. update 'softirq_to_name' in
* kernel/softirq.c when adding a new softirq.
Expand Down

0 comments on commit f96272a

Please sign in to comment.