From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37367 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2nmc-000739-Fj for qemu-devel@nongnu.org; Mon, 04 Oct 2010 12:21:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2nmZ-0003D8-Dp for qemu-devel@nongnu.org; Mon, 04 Oct 2010 12:20:56 -0400 Received: from e5.ny.us.ibm.com ([32.97.182.145]:40293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2nmZ-0003Cv-BO for qemu-devel@nongnu.org; Mon, 04 Oct 2010 12:20:55 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e5.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o94G0cxD020418 for ; Mon, 4 Oct 2010 12:00:38 -0400 Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o94GKrit448502 for ; Mon, 4 Oct 2010 12:20:54 -0400 Received: from d03av05.boulder.ibm.com (loopback [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o94GKq4j009271 for ; Mon, 4 Oct 2010 10:20:53 -0600 Message-ID: <4CA9FEC3.20205@linux.vnet.ibm.com> Date: Mon, 04 Oct 2010 11:20:19 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] virtio: Use ioeventfd for virtqueue notify References: <1285855312-11739-1-git-send-email-stefanha@linux.vnet.ibm.com> <4CA862A7.2080302@redhat.com> <20101003135138.GA19775@redhat.com> <4CA89185.6070302@redhat.com> <20101003142828.GB19775@redhat.com> <4CA92B79.2030805@linux.vnet.ibm.com> <4CA98A8D.4000500@redhat.com> <4CA9DE2A.5080309@linux.vnet.ibm.com> <20101004161238.GB5795@redhat.com> In-Reply-To: <20101004161238.GB5795@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Steve Dobbelstein , Stefan Hajnoczi , kvm@vger.kernel.org, qemu-devel@nongnu.org, Khoa Huynh , Avi Kivity , sri@linux.vnet.ibm.com On 10/04/2010 11:12 AM, Michael S. Tsirkin wrote: > On Mon, Oct 04, 2010 at 09:01:14AM -0500, Anthony Liguori wrote: > >> On 10/04/2010 03:04 AM, Avi Kivity wrote: >> >>> On 10/04/2010 03:18 AM, Anthony Liguori wrote: >>> >>>> On 10/03/2010 09:28 AM, Michael S. Tsirkin wrote: >>>> >>>>> >>>>>> This is using eventfd as well. >>>>>> >>>>> Sorry, I meant irqfd. >>>>> >>>> I've tried using irqfd in userspace. It hurts performance quite >>>> a bit compared to doing an ioctl so I would suspect this too. >>>> >>>> A last_used_idx or similar mechanism should help performance >>>> quite a bit on top of ioeventfd too. >>>> >>>> >>> Any idea why? While irqfd does quite a bit of extra locking, it >>> shouldn't be that bad. >>> >> Not really. It was somewhat counter intuitive. >> >> A worthwhile experiment might be to do some layering violations and >> have vhost do an irq injection via an ioctl and see what the >> performance delta is. >> > I think you don't even need to try that hard. > Just comment this line: > // proxy->pci_dev.msix_mask_notifier = virtio_pci_mask_notifier; > this is what switches to irqfd when msi vector is unmasked. > That drops to userspace though for all irqs, no? Or did you mean that commenting that line out improves performance demonstrating the overhead of irqfd? Regards, Anthony Liguori > >> I suspect it could give vhost a nice boost. >> >> Regards, >> >> Anthony Liguori >>