diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-05-16 14:27:31 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-05-26 09:42:22 -0700 |
commit | 4305ce7894dd38b0633bfc8978437320119223bd (patch) | |
tree | eafe4497236f8dd4ddfdf90fe06a5377912a9c35 /kernel/rcutree.c | |
parent | b5904090c754327ed6c2ecaefed4f7d473df393f (diff) | |
download | kernel_samsung_smdk4412-4305ce7894dd38b0633bfc8978437320119223bd.tar.gz kernel_samsung_smdk4412-4305ce7894dd38b0633bfc8978437320119223bd.tar.bz2 kernel_samsung_smdk4412-4305ce7894dd38b0633bfc8978437320119223bd.zip |
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/rcutree.c')
-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 195b3a3313e..99c6038ad04 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -324,8 +324,8 @@ void rcu_enter_nohz(void) smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */ local_irq_save(flags); rdtp = &__get_cpu_var(rcu_dynticks); - rdtp->dynticks++; - rdtp->dynticks_nesting--; + if (--rdtp->dynticks_nesting == 0) + rdtp->dynticks++; WARN_ON_ONCE(rdtp->dynticks & 0x1); local_irq_restore(flags); } |