Commit 4305ce78 authored by Paul E. McKenney's avatar Paul E. McKenney

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: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent b5904090
...@@ -324,8 +324,8 @@ void rcu_enter_nohz(void) ...@@ -324,8 +324,8 @@ void rcu_enter_nohz(void)
smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */ smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */
local_irq_save(flags); local_irq_save(flags);
rdtp = &__get_cpu_var(rcu_dynticks); rdtp = &__get_cpu_var(rcu_dynticks);
rdtp->dynticks++; if (--rdtp->dynticks_nesting == 0)
rdtp->dynticks_nesting--; rdtp->dynticks++;
WARN_ON_ONCE(rdtp->dynticks & 0x1); WARN_ON_ONCE(rdtp->dynticks & 0x1);
local_irq_restore(flags); local_irq_restore(flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment