aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-05-16 05:52:04 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-05-26 12:42:21 -0400
commitb5904090c754327ed6c2ecaefed4f7d473df393f (patch)
tree46cf53f98413171d92de3b5e11c9327309f240b7 /kernel
parent1135633bddcf7a819a1490c18d04965c490bcc1e (diff)
rcu: Don't do reschedule unless in irq
Condition the set_need_resched() in rcu_irq_exit() on in_irq(). This should be a no-op, because rcu_irq_exit() should only be called from irq. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcutree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 011bf6f261a2..195b3a3313e3 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -421,8 +421,9 @@ void rcu_irq_exit(void)
421 WARN_ON_ONCE(rdtp->dynticks & 0x1); 421 WARN_ON_ONCE(rdtp->dynticks & 0x1);
422 422
423 /* If the interrupt queued a callback, get out of dyntick mode. */ 423 /* If the interrupt queued a callback, get out of dyntick mode. */
424 if (__this_cpu_read(rcu_sched_data.nxtlist) || 424 if (in_irq() &&
425 __this_cpu_read(rcu_bh_data.nxtlist)) 425 (__this_cpu_read(rcu_sched_data.nxtlist) ||
426 __this_cpu_read(rcu_bh_data.nxtlist)))
426 set_need_resched(); 427 set_need_resched();
427} 428}
428 429