Skip to content

Commit

Permalink
rcu: Prevent soft-lockup complaints about no-CBs CPUs
Browse files Browse the repository at this point in the history
The wait_event() at the head of the rcu_nocb_kthread() can result in
soft-lockup complaints if the CPU in question does not register RCU
callbacks for an extended period.  This commit therefore changes
the wait_event() to a wait_event_interruptible().

Reported-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
  • Loading branch information
Paul Gortmaker authored and Paul E. McKenney committed Jan 8, 2013
1 parent d1c3ed6 commit 353af9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/rcutree_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -2366,10 +2366,11 @@ static int rcu_nocb_kthread(void *arg)
for (;;) {
/* If not polling, wait for next batch of callbacks. */
if (!rcu_nocb_poll)
wait_event(rdp->nocb_wq, rdp->nocb_head);
wait_event_interruptible(rdp->nocb_wq, rdp->nocb_head);
list = ACCESS_ONCE(rdp->nocb_head);
if (!list) {
schedule_timeout_interruptible(1);
flush_signals(current);
continue;
}

Expand Down

0 comments on commit 353af9c

Please sign in to comment.