xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Chao Gao <chao.gao@intel.com>
To: George Dunlap <george.dunlap@citrix.com>
Cc: Kevin Tian <kevin.tian@intel.com>, Wei Liu <wei.liu2@citrix.com>,
	Jan Beulich <jbeulich@suse.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Jun Nakajima <jun.nakajima@intel.com>
Subject: Re: [PATCH 0/4] mitigate the per-pCPU blocking list may be too long
Date: Thu, 27 Apr 2017 13:02:42 +0800	[thread overview]
Message-ID: <20170427050240.GA10130@skl-2s3.sh.intel.com> (raw)
In-Reply-To: <CAFLBxZYZXLZGgStzXYh7a-gdLieWpbz0r9Le=cz1c-x=Tiodpg@mail.gmail.com>

On Thu, Apr 27, 2017 at 10:44:26AM +0100, George Dunlap wrote:
>On Thu, Apr 27, 2017 at 1:43 AM, Chao Gao <chao.gao@intel.com> wrote:
>> On Wed, Apr 26, 2017 at 05:39:57PM +0100, George Dunlap wrote:
>>>On 26/04/17 01:52, Chao Gao wrote:
>>>> VT-d PI introduces a per-pCPU blocking list to track the blocked vCPU
>>>> running on the pCPU. Theoretically, there are 32K domain on single
>>>> host, 128 vCPUs per domain. If all vCPUs are blocked on the same pCPU,
>>>> 4M vCPUs are in the same list. Travelling this issue consumes too
>>>> much time. We have discussed this issue in [1,2,3].
>>>>
>>>> To mitigate this issue, we proposed the following two method [3]:
>>>> 1. Evenly distributing all the blocked vCPUs among all pCPUs.
>>>
>>>So you're not actually distributing the *vcpus* among the pcpus (which
>>>would imply some interaction with the scheduler); you're distributing
>>>the vcpu PI wake-up interrupt between pcpus.  Is that right?
>>
>> Yes. I should describe things more clearly.
>>
>>>
>>>Doesn't having a PI on a different pcpu than where the vcpu is running
>>>mean at least one IPI to wake up that vcpu?  If so, aren't we imposing a
>>>constant overhead on basically every single interrupt, as well as
>>>increasing the IPI traffic, in order to avoid a highly unlikely
>>>theoretical corner case?
>>
>> If it will incur at least one more IPI, I can't agree more. I think it
>> depends on whether calling vcpu_unblock() to wake up a vCPU not running
>> on current pCPU will lead to a more IPI compared to the vCPU running
>> on the current pCPU. In my mind, different schedulers may differ on this point.
>
>Well I'm not aware of any way to tell another processor to do
>something in a timely manner other than with an IPI; and in any case
>that's the method that both credit1 and credit2 use.  It's true that
>not all vcpu_wake() calls will end up with an IPI, but a fairly large
>number of them will.  Avoiding this overhead when it's not necessary
>for performance is pretty important.

Ok, I agree and will avoid this overhead in next version. 
Really appreciate your comments.

Thanks
Chao

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

  reply	other threads:[~2017-04-27  5:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26  0:52 [PATCH 0/4] mitigate the per-pCPU blocking list may be too long Chao Gao
2017-04-26  0:52 ` [PATCH 1/4] xentrace: add TRC_HVM_VT_D_PI_BLOCK Chao Gao
2017-04-26  0:52 ` [PATCH 2/4] VT-d PI: Randomly Distribute entries to all online pCPUs' pi blocking list Chao Gao
2017-04-26  0:52 ` [PATCH 3/4] VT-d PI: Add reference count to pi_desc Chao Gao
2017-04-26  0:52 ` [PATCH 4/4] VT-d PI: Don't add vCPU to PI blocking list for a case Chao Gao
2017-04-26  8:19 ` [PATCH 0/4] mitigate the per-pCPU blocking list may be too long Jan Beulich
2017-04-26  3:30   ` Chao Gao
2017-04-26 10:52     ` Jan Beulich
2017-04-26 16:39 ` George Dunlap
2017-04-27  0:43   ` Chao Gao
2017-04-27  9:44     ` George Dunlap
2017-04-27  5:02       ` Chao Gao [this message]
2017-05-02  5:45   ` Chao Gao
2017-05-03 10:08     ` George Dunlap
2017-05-03 10:21       ` Jan Beulich
2017-05-08 16:15         ` Chao Gao
2017-05-08  8:39           ` Jan Beulich
2017-05-08 16:38             ` Chao Gao
2017-05-08  9:13           ` George Dunlap
2017-05-08  9:24             ` Jan Beulich
2017-05-08 17:37               ` Chao Gao

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=20170427050240.GA10130@skl-2s3.sh.intel.com \
    --to=chao.gao@intel.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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).