Messages in this thread | | | Date | Tue, 21 Dec 2010 20:27:41 +0100 | From | Frederic Weisbecker <> | Subject | Re: [RFC PATCH 09/15] rcu: Make rcu_enter,exit_nohz() callable from irq |
| |
On Tue, Dec 21, 2010 at 11:26:35AM -0800, Paul E. McKenney wrote: > On Mon, Dec 20, 2010 at 04:24:16PM +0100, Frederic Weisbecker wrote: > > In order to be able to enter/exit into rcu extended quiescent > > state from interrupt, we need to make rcu_enter_nohz() and > > rcu_exit_nohz() callable from interrupts. > > > > So, this proposes a new implementation of the rcu nohz fast path > > related helpers, where rcu_enter_nohz() or rcu_exit_nohz() can > > be called between rcu_enter_irq() and rcu_exit_irq() while keeping > > the existing semantics. > > > > We maintain three per cpu fields: > > > > - nohz indicates we entered into extended quiescent state mode, > > we may or not be in an interrupt even if that state is set though. > > > > - irq_nest indicates we are in an irq. This number is incremented on > > irq entry and decreased on irq exit. This includes NMIs > > > > - qs_seq is increased everytime we see a true extended quiescent > > state: > > * When we call rcu_enter_nohz() and we are not in an irq. > > * When we exit the outer most nesting irq and we are in > > nohz mode (rcu_enter_nohz() was called without a pairing > > rcu_exit_nohz() yet). > > > > >From that three-part we can deduce the extended grace periods like > > we did before on top of snapshots and comparisons. > > > > If nohz == 1 and irq_nest == 0, we are in a quiescent state. qs_seq > > is used to keep track of elapsed extended quiescent states, useful > > to compare snapshots of rcu nohz state. > > > > This is experimental and does not take care of barriers yet. > > Indeed!!! > > I will likely be reworking the dyntick interface soon anyway, so will > try to make sure that your requirements are met.
Great, thanks!
| |