Re: nohz_cpu_mask question (was: Re: [PATCH tip/core/rcu] classic RCU locking and memory-barrier cleanups)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Tuesday, August 19, 2008 - 10:41 am

On Tue, Aug 19, 2008 at 07:16:32PM +0200, Manfred Spraul wrote:

Yep, that is correct.


That is indeed the approach that preemptable RCU takes, and
I am considering making classic RCU also take this approach.
The main advantage is that sleeping CPUs need not be awakened
unless it is participating directly in the RCU grace period (as in
it has some callbacks).  See rcu_irq_enter() and rcu_irq_exit() in
kernel/rcupreempt.c as well as rcu_enter_nohz() and rcu_exit_nohz()
in include/linux/rcupreempt.h.  And http://lwn.net/Articles/279077/
for the proof of correctness.  ;-)

Instead, classic RCU prevents any CPU from going into nohz mode in the
first place if RCU is waiting on it.  I am not completely confident
in this algorithm, which is one reason that I am looking to switch to
the preemptable RCU approach.  The other reason is power efficiency --
after all, why bother waking up a CPU just to have it tell RCU that it
is sitting idle?

							Thanx, Paul
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: nohz_cpu_mask question (was: Re: [PATCH tip/core/rcu] ..., Paul E. McKenney, (Tue Aug 19, 10:41 am)