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

Re: [Xen-devel] xen/arm: Domain not fully destroyed when using credit2



On Thu, 2017-02-02 at 04:22 -0700, Jan Beulich wrote:

> On 01.02.17 at 19:21, <wei.liu2@xxxxxxxxxx> wrote:

> > On Tue, Jan 31, 2017 at 04:30:50PM +0000, Julien Grall wrote:

> > > Yeah, even the tiny RCU code is quite complex :/. I've looked at 
> > > our RCUcode and noticed there is a link in the header to [1].
> > > 
> > > It seems to be a documentation about the RCU code we used. From
> > > my
> > > understanding of the "RCU Implementations", the authors are
> > > expecting a
> > > timer to kick periodically pCPU and check if there is some RCU
> > > work pending.

> > Worth checking all the RCU docs in Linux (Documentation/RCU).
> > 
> > I think there are descriptions about idle or no-tick variants.
>
It surely is worth, but bearing in mind that, as said before, Linux
RCUs are indeed more powerful than what we have, but also much much
much much more complex than what we probably need.

And (for Julien), perhaps it's me, but I don't think I see references
or hints at using a timer in the docs you linked, nor on other RCU doc
material.

As a matter of fact, I agree with Jan, i.e.,

> Isn't all we need an rcu_idle_{enter,exit}() implementation (and of
> course calls to them placed where needed)?
> 
This is what I think we're missing. And, AFAIUI, it's sort of similar
to what Stefano (I think) was saying, that a CPU going idle is a step
toward grace period, because rcu critical sections can't occur on it.

As per what Julien said about softirqs (which also looks right to me),
this is how Linux handles the issue:

http://lxr.free-electrons.com/source/kernel/rcu/tree.c#L733
/**
 * rcu_idle_enter - inform RCU that current CPU is entering idle
 *
 * Enter idle mode, in other words, -leave- the mode in which RCU
 * read-side critical sections can occur.  (Though RCU read-side
 * critical sections can occur in irq handlers in idle, a possibility
 * handled by irq_enter() and irq_exit().)
 */

So we may also need rcu_irq_enter() and rcu_irq_exit().

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
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®.