aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-08-12 14:27:31 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-09-16 13:08:03 -0400
commit1772947bd0126661866069157e95197e9c0020e9 (patch)
treeda761ad8810ea53199d87602d900652d529c8adb
parent39953dfd40077c7480b1d5deb4d617e086b1c865 (diff)
rcu: Handle NOCB callbacks from irq-disabled idle code
If an RCU callback is queued on a no-CBs CPU from idle code with irqs disabled, and if that CPU stays idle forever after, the callback will never be invoked. This commit therefore adds a check for this situation in ____call_rcu_nocb(), invoking the RCU core solely for the purpose of the ensuing return-to-idle transition. (If the CPU doesn't return to idle, the next scheduling-clock interrupt will fix things up.) Reported-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--kernel/rcu/tree_plugin.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 4ad63d861599..8b7351836228 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -2129,6 +2129,17 @@ static bool __call_rcu_nocb(struct rcu_data *rdp, struct rcu_head *rhp,
2129 trace_rcu_callback(rdp->rsp->name, rhp, 2129 trace_rcu_callback(rdp->rsp->name, rhp,
2130 -atomic_long_read(&rdp->nocb_q_count_lazy), 2130 -atomic_long_read(&rdp->nocb_q_count_lazy),
2131 -atomic_long_read(&rdp->nocb_q_count)); 2131 -atomic_long_read(&rdp->nocb_q_count));
2132
2133 /*
2134 * If called from an extended quiescent state with interrupts
2135 * disabled, invoke the RCU core in order to allow the idle-entry
2136 * deferred-wakeup check to function.
2137 */
2138 if (irqs_disabled_flags(flags) &&
2139 !rcu_is_watching() &&
2140 cpu_online(smp_processor_id()))
2141 invoke_rcu_core();
2142
2132 return true; 2143 return true;
2133} 2144}
2134 2145