[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 5/5] xen: RCU: avoid busy waiting until the end of grace period.

Hi Dario,

On 01/08/17 10:17, Dario Faggioli wrote:
On Tue, 2017-08-01 at 09:54 +0100, Julien Grall wrote:
Hi Dario,

On 27/07/2017 09:01, Dario Faggioli wrote:
Instead of having the CPU where a callback is queued, busy
looping on rcu_pending(), use a timer.

In fact, we let the CPU go idla,e but we program a timer
that will periodically wake it up, for checking whether the
grace period has actually ended.

It is kind of similar to introducing a periodic tick, but
with a much more limited scope, and a lot less overhead. In
fact, this timer is:
- only active for the CPU(s) that have callbacks queued,
  waiting for the end of a grace period;
- only active when those CPU(s) are idle (and stopped as
  soon as they resume execution).

If I read this correctly, it means on ARM the idling will now get
interrupted periodically. This is a bit unfortunate, given that if
have a CPU doing nothing, you would still interrupt it

Not really periodically, not always, at least. What this really means
is that a CPU that is idle, *but* have pending RCU callbacks, will be
interrupted periodically to see if the grace period ended, so it can
invoke the callbacks.

As soon as this (callbacks being invoked) will have happened, we won't
interrupt it any longer.

And idle CPUs _without_ queued RCU callbacks, won't be interrupted at

Oh, the commit message is not clear about it. The wording gives the impression the timer will always be here on every idle CPU(s). In the case on active CPU(s) you specific mention the end of the grace period.

Thank you for the clarification and please disregard the rest of my e-mail then.


Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.