Re: A few questions and issues with dynticks, NOHZ and powertop

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Monday, April 5, 2010 - 2:38 pm

On Mon, Apr 05, 2010 at 11:03:40PM +0200, Dominik Brodowski wrote:

Only after the next tick.  To see why, imagine an RCU callback that
re-registers itself -- which is a perfectly legal thing to do.  The
only thing that will happen if we run through grace periods faster is
that we will have more invocations of that same callback to deal with.

So we try for a bit, and if that doesn't get rid of all of the callbacks,
we hold off until the next jiffy.


I don't recall your posting wakeups-from-idle for the original -- did
we get improvement?  You did say "roughly 50%", but...

OK, I see what is happening...

What happens in the CONFIG_RCU_FAST_NO_HZ case is as follows:

o	Check to see if the holdoff period is in effect, and if so,
	just check to see if RCU needs the CPU for later processing
	without attempting to accelerate grace periods.

o	Check to see if there is some other non-dyntick-idle CPU.
	If there is, reset holdoff state and just check to see if
	RCU needs the CPU for later processing without attempting to
	accelerate grace periods.

o	Check for initialization and hitting the RCU_NEEDS_CPU_FLUSHES
	limit, again doing the "just check" thing if we hit the limit.

o	For each of RCU-sched and RCU-bh, note a quiescent state
	and force the grace-period machinery, noting in each case
	whether or not there are callbacks left to invoke.

o	If there are callbacks left to invoke, raise RCU_SOFTIRQ.
	This softirq will process the callbacks.  (Why not just invoke
	the softirq function directly?	Because lockdep yells at you
	and I do not believe that this is a false positive.)

o	If there are callbacks left to invoke, tell the caller that
	this CPU cannot yet enter dyntick-idle state.

But if we told the caller that this CPU cannot yet enter dyntick-idle
state, then we also raised RCU_SOFTIRQ.  Once the softirq returns, we
should once again try to enter dyntick-idle state.

So a significant fraction of calls to rcu_needs_cpu() saying "no" does
not necessarily mean that we are taking significant time to get the
grace periods and callbacks out of the way.  The funny loop involving
softirq is required due to locking-design issues.

Or are you seeing significant delays between successive calls to
rcu_needs_cpu() on your setup?


TINY_RCU is set up to automatically do CONFIG_RCU_FAST_NO_HZ, and do
the same softirq dance, or that is the theory, anyway.  Again, are you
seeing significant delays between successive calls to rcu_needs_cpu()?


;-)

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

Messages in current thread:
Re: A few questions and issues with dynticks, NOHZ and pow ..., Paul E. McKenney, (Mon Apr 5, 2:38 pm)