From: Dario Faggioli <dario.faggioli@citrix.com>
To: Julien Grall <julien.grall@arm.com>,
Stefano Stabellini <sstabellini@kernel.org>
Cc: edgar.iglesias@xilinx.com, george.dunlap@eu.citrix.com,
nd@arm.com, Punit Agrawal <punit.agrawal@arm.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH] xen/arm: introduce vwfi parameter
Date: Tue, 21 Feb 2017 17:51:39 +0100 [thread overview]
Message-ID: <1487695899.6732.420.camel@citrix.com> (raw)
In-Reply-To: <14575011-0042-8940-c19f-2482136ff91c@foss.arm.com>
[-- Attachment #1.1: Type: text/plain, Size: 2141 bytes --]
On Tue, 2017-02-21 at 12:30 +0000, Julien Grall wrote:
> On 21/02/2017 09:09, Dario Faggioli wrote:
> > Well, TBH, we still are not entirely sure who the culprit is for
> > high
> > latency. There are spikes in Credit2, and I'm investigating that.
> > But
> > apart from them? I think we need other numbers with which we can
> > compare the numbers that Stefano has collected.
>
> I think the problem is because we save/restore the vCPU state when
> switching to the idle vCPU.
>
That may well be. Or at least, that may well be part of the problem. I
don't know enough of ARM to know whether it's the predominant cause of
high latencies or not.
On x86, on Linux, polling is used to prevent the CPU to go in deep
C-states. I was assuming things to be similar on ARM, and that's the
reason why I thought introducing a polling mode could have been useful
(although wasteful).
But you guys are the ones that know whether or not that is the case
(and in another email, you seem to say it's not).
> Let say the only 1 vCPU can run on the pCPU, when the vCPU is issuing
> a
> WFI the following steps will happen:
> * WFI trapped and vcpu blocked
> * save vCPU state
> * run idle_loop
> -> Interrupt incoming for the guest
> * restore vCPU state
> * back to the guest
>
> Saving/restoring on ARM requires to context switch all the state of
> the
> VM (this is not saved in memory when entering in the hypervisor).
> This
> include things like system register, interrupt controller state,
> FPU...
>
Yes. In fact, on x86, we have what we call 'lazy context switch', which
deals specifically with some aspect of this situation.
Indeed it seems like implementing the same on ARM --if you don't have
it already, and if possible-- would be useful in this case too.
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 #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-02-21 16:52 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1487286292-29502-1-git-send-email-sstabellini@kernel.org>
[not found] ` <a271394a-6c76-027c-fb08-b3fe775224ba@arm.com>
2017-02-17 22:50 ` [PATCH] xen/arm: introduce vwfi parameter Stefano Stabellini
2017-02-18 1:47 ` Dario Faggioli
2017-02-19 21:27 ` Julien Grall
2017-02-20 10:43 ` George Dunlap
2017-02-20 11:15 ` Dario Faggioli
2017-02-19 21:34 ` Julien Grall
2017-02-20 11:35 ` Dario Faggioli
2017-02-20 18:43 ` Stefano Stabellini
2017-02-20 18:45 ` George Dunlap
2017-02-20 18:49 ` Stefano Stabellini
2017-02-20 18:47 ` Stefano Stabellini
2017-02-20 18:53 ` Julien Grall
2017-02-20 19:20 ` Dario Faggioli
2017-02-20 19:38 ` Julien Grall
2017-02-20 22:53 ` Dario Faggioli
2017-02-21 0:38 ` Stefano Stabellini
2017-02-21 8:10 ` Julien Grall
2017-02-21 9:24 ` Dario Faggioli
2017-02-21 13:04 ` Julien Grall
2017-02-21 7:59 ` Julien Grall
2017-02-21 9:09 ` Dario Faggioli
2017-02-21 12:30 ` Julien Grall
2017-02-21 13:46 ` George Dunlap
2017-02-21 15:07 ` Dario Faggioli
2017-02-21 17:49 ` Stefano Stabellini
2017-02-21 17:56 ` Julien Grall
2017-02-21 18:30 ` Stefano Stabellini
2017-02-21 19:20 ` Julien Grall
2017-02-22 4:21 ` Edgar E. Iglesias
2017-02-22 17:22 ` Stefano Stabellini
2017-02-23 9:19 ` Edgar E. Iglesias
2017-02-21 18:17 ` George Dunlap
2017-02-22 16:40 ` Dario Faggioli
2017-02-21 15:14 ` Julien Grall
2017-02-21 16:59 ` George Dunlap
2017-02-21 18:03 ` Stefano Stabellini
2017-02-21 18:24 ` Julien Grall
2017-02-21 16:51 ` Dario Faggioli [this message]
2017-02-21 17:39 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487695899.6732.420.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=edgar.iglesias@xilinx.com \
--cc=george.dunlap@eu.citrix.com \
--cc=julien.grall@arm.com \
--cc=nd@arm.com \
--cc=punit.agrawal@arm.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).