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

Re: [Xen-devel] [PATCH] xen/arm: introduce vwfi parameter



On Mon, 2017-02-20 at 18:53 +0000, Julien Grall wrote:
> On 20/02/17 18:47, Stefano Stabellini wrote:
> > This is a good question, I have already answered: I think it would
> > break
> > the scheduler. Dario confirmed it in his reply
> > (1487382463.6732.146.camel@xxxxxxxxxx).
> 
> I don't think it will break the scheduler, we are trapping WFI/WFE
> to 
> take advantage of the quiescence of the guest. If we don't do that,
> the 
> guest will just waste his slot.
> 
Err... Wait... WF* basically puts a _pCPU_ to sleep until something
happens (interrupt or event). This is not something we let a guest
_vCPU_ do!

E.g., if vCPU x of domain A wants to go idle with a WFI/WFE, but the
host is overbooked and currently really busy, Xen wants to run some
other vCPU (of either the same of another domain).

That's actually the whole point of virtualization, and the reason why
overbooking an host with more vCPUs (from multiple guests) than it has
pCPUs works at all. If we start letting guests put the host's pCPUs to
sleep, not only the scheduler, but many things would break, IMO!

> Even if the WFI is done by the guest, you will receive the scheduler 
> interrupt in Xen and that's fine. Did I miss anything?
> 
Maybe it's me that am missing what you actually mean here.

What do you mean with "you will receive the scheduler interrupt"? Right
now, HLT in guest means block in Xen, which makes the scheduler run and
decide whether the pCPU should stay idle, or run someone else. I'd say
that no good can come from having HTL in guest automatically meaning
also on the pCPU.

So, I'm not sure what we're talking about, but what I'm quite sure is
that we don't want a guest to be able to decide when and until what
time/event, a pCPU goes idle.

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