From: Christian Borntraeger <borntraeger@de.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
Alexander Graf <agraf@suse.de>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH RFC] vhost: fix vhost force with msix=off
Date: Thu, 18 Apr 2013 09:55:12 +0200 [thread overview]
Message-ID: <516FA6E0.8050707@de.ibm.com> (raw)
In-Reply-To: <20130417134233.GA26335@redhat.com>
On 17/04/13 15:42, Michael S. Tsirkin wrote:
[...]
>> +static int virtio_ccw_set_guest_notifier(VirtioCcwDevice *dev, int n,
>> + bool assign, bool with_irqfd)
>> +{
>> + VirtQueue *vq = virtio_get_queue(dev->vdev, n);
>> + EventNotifier *notifier = virtio_queue_get_guest_notifier(vq);
>> +
>> + if (assign) {
>> + int r = event_notifier_init(notifier, 0);
>> +
>> + if (r < 0) {
>> + return r;
>> + }
>> + virtio_queue_set_guest_notifier_fd_handler(vq, true, with_irqfd);
>> + /* We do not support irqfd for classic I/O interrupts, because the
>> + * classic interrupts are intermixed with the subchannel status, that
>> + * is queried with test subchannel. We want to use vhost, though.
>> + * Lets make sure to have vhost running and wire up the irq fd to
>> + * land in qemu (and only the irq fd) in this code.
>
> Still, this is not optimal.
Correct. This is just to make vhost work.
We still get a decent performance improvement, though. (iperf gets 2.5x faster)
So it is actually a good idea to allow vhost even if there is no kernel side irq
injection as long as we have somebody listening on the eventfd for this irq.
> Isn't there some way to actually use irqfd to bypass qemu?
We had some thoughs about having irqfd for the I/O interrupts and every idea had
its downside (e.g. putting all the channel I/O code in the kernel, having
a big qemu/kernel shared memory data structure, ...). We are still looking for
some good ideas to also provide kernel I/O interrupt injection.
> Is there some other kind of interrupt virtio can use that
> works fine with irqfd?
Yes, there is a lightweight form of I/O interrupts that is also used for the
real network cards (OSA) which does not require a TSCH we are currently also
investigating this approach.
[...]
>> So it might be an alternative to have a look at vhost code,which currently
>> requires the virtio transport to actively maintain the masking thing .
>>
>> Christian
>
> I suggest we merge your code as is, then look for
> similiarities with PCI to move into virtio core.
Ok. Conny can you refresh the patches so that we can have a look?
next prev parent reply other threads:[~2013-04-18 7:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-15 14:40 [Qemu-devel] [PATCH RFC] vhost: fix vhost force with msix=off Michael S. Tsirkin
2013-04-17 12:03 ` Christian Borntraeger
2013-04-17 13:42 ` Michael S. Tsirkin
2013-04-18 7:55 ` Christian Borntraeger [this message]
2013-04-22 9:11 ` [Qemu-devel] [PATCH RFC 0/3] virtio-ccw: Add notifiers support Cornelia Huck
2013-04-22 9:11 ` [Qemu-devel] [PATCH RFC 1/3] linux-headers: Update with ioeventfd changes Cornelia Huck
2013-04-22 9:11 ` [Qemu-devel] [PATCH RFC 2/3] virtio-ccw: Wire up ioeventfd Cornelia Huck
2013-04-22 9:11 ` [Qemu-devel] [PATCH RFC 3/3] virtio-ccw: Wire up guest and host notifies Cornelia Huck
2013-04-18 17:19 ` [Qemu-devel] [PATCH RFC] vhost: fix vhost force with msix=off Alexander Graf
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=516FA6E0.8050707@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=agraf@suse.de \
--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).