From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Tim Deegan <tim@xen.org>, "Wu, Feng" <feng.wu@intel.com>
Cc: "Zhang, Yang Z" <yang.z.zhang@intel.com>,
"Tian, Kevin" <kevin.tian@intel.com>,
Jan Beulich <JBeulich@suse.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: VT-d Posted-interrupt (PI) design for XEN
Date: Mon, 9 Mar 2015 11:45:59 +0000 [thread overview]
Message-ID: <54FD87F7.6020309@citrix.com> (raw)
In-Reply-To: <20150309103305.GA50450@deinos.phlegethon.org>
On 09/03/15 10:33, Tim Deegan wrote:
> At 02:03 +0000 on 09 Mar (1425863009), Wu, Feng wrote:
>>
>>> -----Original Message-----
>>> From: Tim Deegan [mailto:tim@xen.org]
>>> Sent: Friday, March 06, 2015 5:44 PM
>>> To: Wu, Feng
>>> Cc: Jan Beulich; Zhang, Yang Z; Tian, Kevin; xen-devel@lists.xen.org
>>> Subject: Re: [Xen-devel] VT-d Posted-interrupt (PI) design for XEN
>>>
>>> At 02:07 +0000 on 06 Mar (1425604054), Wu, Feng wrote:
>>>>> From: Tim Deegan [mailto:tim@xen.org]
>>>>> But I don't understand why we would need a new global vector for
>>>>> RUNSTATE_blocked rather than suppressing the posted interrupts as you
>>>>> suggest for RUNSTATE_runnable. (Or conversely why not use the new
>>>>> global vector for RUNSTATE_runnable too?)
>>>> If we suppress the posted-interrupts when vCPU is blocked, it cannot
>>>> be unblocked by the external interrupts, this is not correct.
>>> OK, I don't understand at all now. :) When the posted interrupt is
>>> suppressed, what happens to the interrupt?
>> When the posted interrupt is suppressed, VT-d engine will not issue
>> notification events.
>>
>>> If it's just dropped, then we can't use that for _any_ cases.
>> We can suppress the posted-interrupt when vCPU is waiting in the runqueue
>> (vCPU is in RUNSTATE_runnable state), it is not needed to send notification
>> event when vCPU is in this state, since when interrupt happens, the interrupt
>> information are not _dropped_, instead, they are stored in PIR, and this will
>> be synced to vIRR before VM-Entry.
> So you think you can use the same system for RUNSTATE_runnable as
> RUNSTATE_blocked? That seems like a good idea.
>
> I'll leave the details (e.g. single global vector + queue vs any other
> way to wake the vcpu) to people who know the x86 irq code better than
> I do. :)
>From my reading the relevant section in the VT-d spec, to the best of my
understanding:
We only need the second vector if Xen wishes to be informed that an
interrupt has been queued for a vcpu. The spec suggests that, for one
usecase, this information should affect scheduling decisions.
If we do not wish to make scheduling alterations based on interrupt
delivery, the extra vector can be ignored.
If we do wish to make scheduling alterations, we will need to be able to
uniquely identify a vcpu from a vector, which will involve allocating
one vector per vcpu.
If my understanding is correct, I would suggest that Xen opt for not
getting notifications. Interrupting one guest to indicate that another
vcpu has been interrupted scales progressively worse with the number of
running VMs, and there are existing usecases which have already
exhausted the x86 vector space completely.
It might be sensible to have the option available as a per-domain opt-in
option. A usecase such as device driver domain could easily want to
deal with its interrupts ahead of running the domains it is servicing.
~Andrew
next prev parent reply other threads:[~2015-03-09 11:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 13:30 VT-d Posted-interrupt (PI) design for XEN Wu, Feng
2015-03-04 15:19 ` Jan Beulich
2015-03-05 5:04 ` Wu, Feng
2015-03-05 7:12 ` Jan Beulich
2015-03-05 8:29 ` Wu, Feng
2015-03-05 8:52 ` Jan Beulich
2015-03-05 9:07 ` Wu, Feng
2015-03-05 10:14 ` Jan Beulich
2015-03-06 2:01 ` Wu, Feng
2015-03-05 12:02 ` Tim Deegan
2015-03-06 2:07 ` Wu, Feng
2015-03-06 9:44 ` Tim Deegan
2015-03-09 2:03 ` Wu, Feng
2015-03-09 10:33 ` Tim Deegan
2015-03-09 11:45 ` Andrew Cooper [this message]
2015-03-10 2:01 ` Tian, Kevin
2015-03-16 4:03 ` Wu, Feng
2015-03-16 5:07 ` Wu, Feng
2015-03-04 18:48 ` Andrew Cooper
2015-03-05 5:28 ` Wu, Feng
2015-03-10 2:22 ` Tian, Kevin
2015-03-16 4:03 ` Wu, Feng
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=54FD87F7.6020309@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=feng.wu@intel.com \
--cc=kevin.tian@intel.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
--cc=yang.z.zhang@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.