diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-05-16 17:27:31 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-05-26 12:42:22 -0400 |
commit | 4305ce7894dd38b0633bfc8978437320119223bd (patch) | |
tree | eafe4497236f8dd4ddfdf90fe06a5377912a9c35 /kernel | |
parent | b5904090c754327ed6c2ecaefed4f7d473df393f (diff) |
rcu: Make rcu_enter_nohz() pay attention to nesting
The old version of rcu_enter_nohz() forced RCU into nohz mode even if
the nesting count was non-zero. This change causes rcu_enter_nohz()
to hold off for non-zero nesting counts.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rcutree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 195b3a3313e3..99c6038ad04d 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -324,8 +324,8 @@ void rcu_enter_nohz(void) | |||
324 | smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */ | 324 | smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */ |
325 | local_irq_save(flags); | 325 | local_irq_save(flags); |
326 | rdtp = &__get_cpu_var(rcu_dynticks); | 326 | rdtp = &__get_cpu_var(rcu_dynticks); |
327 | rdtp->dynticks++; | 327 | if (--rdtp->dynticks_nesting == 0) |
328 | rdtp->dynticks_nesting--; | 328 | rdtp->dynticks++; |
329 | WARN_ON_ONCE(rdtp->dynticks & 0x1); | 329 | WARN_ON_ONCE(rdtp->dynticks & 0x1); |
330 | local_irq_restore(flags); | 330 | local_irq_restore(flags); |
331 | } | 331 | } |