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

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



On 08/18/2017 07:04 PM, Dario Faggioli wrote:
> On the CPU where a callback is queued, cpu_is_haltable()
> returns false (due to rcu_needs_cpu() being itself false).
> That means the CPU would spin inside idle_loop(), continuously
> calling do_softirq(), and, in there, continuously checking
> rcu_pending(), in a tight loop.
> 
> Let's instead allow the CPU to really go idle, but make sure,
> by arming a timer, that we periodically check whether the
> grace period has come to an ended. As the period of the
> timer, we pick a value that makes thing look like what
> happens in Linux, with the periodic tick (as this code
> comes from there).
> 
> Note that the timer will *only* be armed on CPUs that are
> going idle while having queued RCU callbacks. On CPUs that
> don't, there won't be any timer, and their sleep won't be
> interrupted (and even for CPUs with callbacks, we only
> expect an handful of wakeups at most, but that depends on
> the system load, as much as from other things).
> 
> Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>

Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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