From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USjgf-0002CH-GE for qemu-devel@nongnu.org; Thu, 18 Apr 2013 03:55:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USjgd-0001Vv-R8 for qemu-devel@nongnu.org; Thu, 18 Apr 2013 03:55:21 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:52092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USjgd-0001VU-Hx for qemu-devel@nongnu.org; Thu, 18 Apr 2013 03:55:19 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 18 Apr 2013 08:52:16 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 0E3D217D8028 for ; Thu, 18 Apr 2013 08:56:10 +0100 (BST) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps4076.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r3I7t48W27656352 for ; Thu, 18 Apr 2013 07:55:04 GMT Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r3I6eHRk011916 for ; Thu, 18 Apr 2013 02:40:17 -0400 Message-ID: <516FA6E0.8050707@de.ibm.com> Date: Thu, 18 Apr 2013 09:55:12 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <20130415144024.GA20178@redhat.com> <516E8F80.3080608@de.ibm.com> <20130417134233.GA26335@redhat.com> In-Reply-To: <20130417134233.GA26335@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC] vhost: fix vhost force with msix=off List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Cornelia Huck , Alexander Graf , qemu-devel@nongnu.org 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?