Messages in this thread | | | Date | Tue, 17 May 2011 00:40:30 +0200 | From | Frederic Weisbecker <> | Subject | Re: [GIT PULL rcu/next] rcu commits for 2.6.40 |
| |
On Sun, May 15, 2011 at 10:56:15PM -0700, Paul E. McKenney wrote: > On Mon, May 16, 2011 at 12:01:17AM +0200, Frederic Weisbecker wrote: > > On Sat, May 14, 2011 at 11:34:53AM -0700, Paul E. McKenney wrote: > > > rcutree.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++----------- > > > 1 file changed, 75 insertions(+), 16 deletions(-) > > > > > > diff --git a/kernel/rcutree.c b/kernel/rcutree.c > > > index a4a2ef0..0b541bd 100644 > > > --- a/kernel/rcutree.c > > > +++ b/kernel/rcutree.c > > > @@ -308,23 +308,25 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp) > > > > > > #ifdef CONFIG_NO_HZ > > > > > > -/** > > > - * rcu_enter_nohz - inform RCU that current CPU is entering nohz > > > +/* > > > + * __rcu_enter_nohz - inform RCU that current CPU is entering nohz > > > * > > > * Enter nohz mode, in other words, -leave- the mode in which RCU > > > * read-side critical sections can occur. (Though RCU read-side > > > * critical sections can occur in irq handlers in nohz mode, a possibility > > > * handled by rcu_irq_enter() and rcu_irq_exit()). > > > + * > > > + * This variant should only be called from rcu_irq_exit() because it > > > + * assumes perfect nesting. The caller must have irqs disabled. > > > */ > > > -void rcu_enter_nohz(void) > > > +void __rcu_enter_nohz(void) > > > { > > > - unsigned long flags; > > > struct rcu_dynticks *rdtp; > > > > > > - local_irq_save(flags); > > > rdtp = &__get_cpu_var(rcu_dynticks); > > > + WARN_ON_ONCE(rdtp->dynticks_nesting <= 0); > > > > But this warning will always trigger if it's called from rcu_irq_enter() > > after rcu_enter_nohz(). Right? > > Hello, Frederic, > > Thank you for looking this over! > > But you lost me on this one. Isn't __rcu_enter_nohz() called from > rcu_irq_exit() rather than from rcu_irq_enter()?
Oops, right I read it too quickly.
| |