Skip to content

Commit

Permalink
rcu: Make rcu_enter_nohz() pay attention to nesting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul E. McKenney committed May 26, 2011
1 parent b590409 commit 4305ce7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/rcutree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 4305ce7

Please sign in to comment.