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

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



On Tue, 28 Feb 2017, Julien Grall wrote:
> Hi Stefano,
> 
> On 22/02/17 17:29, Stefano Stabellini wrote:
> > Introduce new Xen command line parameter called "vwfi", which stands for
> > virtual wfi. The default is "trap": Xen traps the guest wfi instruction
> > and calls vcpu_block on the guest vcpu. The behavior can be changed
> > setting vwfi to "native", in that case Xen doesn't trap the instruction
> > at all, running it in guest context.
> > 
> > The result is strong reduction in irq latency (from 5000ns to 2000ns,
> > measured using https://github.com/edgarigl/tbm, the physical timer, and
> > 1 pcpu dedicated to 1 vcpu). The downside is that the scheduler thinks
> > that the guest is busy when actually is sleeping, leading to suboptimal
> > scheduling decisions.
> 
> This patch is reducing WFI latency and I think we should have similar option
> for WFE.
> 
> WFE will be used for instance when a processor is trying to acquire a lock
> already taken and wait until an event is received. So you want to a good
> latency here too.
> 
> We should probably have a single option handling the both. I am not sure
> whether it is worth to allow native for one but not the other.

The reason why I didn't do the same for WFE is that WFE is already
implemented with vcpu_yield which has good performance, and doesn't
cause the idle vcpu to be scheduled.

That said, it is true that if the user wants WFI not to be trapped, she
is probably going to also want WFE not to be trapped, because the
use-case is the same. There is not much point in trapping WFE in Xen,
then go back to the same vcpu.

I'll keep the same command line option name "vwfi".

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