aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-05-16 14:27:31 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-05-26 09:42:22 -0700
commit4305ce7894dd38b0633bfc8978437320119223bd (patch)
treeeafe4497236f8dd4ddfdf90fe06a5377912a9c35
parentb5904090c754327ed6c2ecaefed4f7d473df393f (diff)
downloadkernel_samsung_aries-4305ce7894dd38b0633bfc8978437320119223bd.zip
kernel_samsung_aries-4305ce7894dd38b0633bfc8978437320119223bd.tar.gz
kernel_samsung_aries-4305ce7894dd38b0633bfc8978437320119223bd.tar.bz2
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>
-rw-r--r--kernel/rcutree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 195b3a3..99c6038 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);
}