From: Jason Wang <jasowang@redhat.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] vhost: don't set vring call if no vector
Date: Wed, 3 Aug 2016 09:48:01 +0800 [thread overview]
Message-ID: <99fc5bcd-e504-ce61-c17d-3b5da6bcb636@redhat.com> (raw)
In-Reply-To: <20160802083713.10f06635.cornelia.huck@de.ibm.com>
On 2016年08月02日 14:37, Cornelia Huck wrote:
> On Tue, 2 Aug 2016 10:39:22 +0800
> Jason Wang <jasowang@redhat.com> wrote:
>
>> On 2016年08月02日 02:00, Cornelia Huck wrote:
>>> On Mon, 1 Aug 2016 16:07:58 +0800
>>> Jason Wang <jasowang@redhat.com> wrote:
>>>> + if (k->query_guest_notifiers &&
>>>> + k->query_guest_notifiers(qbus->parent) &&
>>>> + virtio_queue_vector(vdev, idx) == VIRTIO_NO_VECTOR) {
>>> I'm trying to imagine what this means for virtio-ccw. Keep in mind that
>>> we don't have the concept of setting a 'vector' by the OS (the vector
>>> is setup internally to the queue index and the OS does not see it.)
>>>
>>> ->query_guest_notifiers() is true if the OS has enabled the subchannel
>>> of the proxy device (i.e., if it is enabled for doing *anything* with
>>> the subchannel, regardless whether the OS wants to be notified or is
>>> planning to poll.) The second condition will never hold true for any
>>> valid queue once the OS has setup the queues.
>> I see, so If I understand correctly, there's no way to detect whether or
>> not guest will use a specific virtqueue interrupt?
> Yes. The guest will either be notified for any virtqueue (if it
> registered indicators; this is always done for every vq of the device
> at once), or for none.
>
>>> So this won't break anything for virtio-ccw AFAICS, but I don't think
>>> we gain anything.
>> Yes, but if we could infer whether or not polling is used in the driver,
>> this is probably all we can do for ccw.
> What we could do is check whether the driver has registed indicators
> and disable setting up notification for any vq of the device if not.
> But I'm not sure an always-polling driver is worth optimizing for.
It's worth for at least pci transport. Consider virito-net pmd in guest,
a NULL vring call can save unnecessary userspace memory access and
memory barriers.
prev parent reply other threads:[~2016-08-03 1:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-01 8:07 [Qemu-devel] [PATCH] vhost: don't set vring call if no vector Jason Wang
2016-08-01 14:08 ` Michael S. Tsirkin
2016-08-02 2:37 ` Jason Wang
2016-08-01 18:00 ` Cornelia Huck
2016-08-02 2:39 ` Jason Wang
2016-08-02 6:37 ` Cornelia Huck
2016-08-03 1:48 ` Jason Wang [this message]
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=99fc5bcd-e504-ce61-c17d-3b5da6bcb636@redhat.com \
--to=jasowang@redhat.com \
--cc=cornelia.huck@de.ibm.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.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).