Received: from eggs.gnu.org ([2001:4830:134:3::10]:47468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHnvo-0003aK-UK for qemu-devel@nongnu.org; Tue, 28 Jun 2016 03:59:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHnvk-00057H-S3 for qemu-devel@nongnu.org; Tue, 28 Jun 2016 03:59:39 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58003 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHnvk-00057B-O0 for qemu-devel@nongnu.org; Tue, 28 Jun 2016 03:59:36 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u5S7wuwF030043 for ; Tue, 28 Jun 2016 03:59:36 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 23sjvxgh2b-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 28 Jun 2016 03:59:36 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 28 Jun 2016 08:59:34 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 16D0B17D8066 for ; Tue, 28 Jun 2016 09:00:52 +0100 (BST) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u5S7xWnY4522350 for ; Tue, 28 Jun 2016 07:59:32 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u5S7xVPi014091 for ; Tue, 28 Jun 2016 01:59:31 -0600 Date: Tue, 28 Jun 2016 09:59:27 +0200 From: Cornelia Huck In-Reply-To: <57722B75.9090406@kamp.de> References: <5770F58F.2080402@kamp.de> <20160627170938.04a7a13c.cornelia.huck@de.ibm.com> <20160628100152-mutt-send-email-mst@redhat.com> <20160628094245.0fefc484.cornelia.huck@de.ibm.com> <57722B75.9090406@kamp.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20160628095927.506795cb.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] Regression: virtio-pci: convert to ioeventfd callbacks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: "Michael S. Tsirkin" , "qemu-devel@nongnu.org" , famz@redhat.com, stefanha@redhat.com On Tue, 28 Jun 2016 09:47:01 +0200 Peter Lieven wrote: > Am 28.06.2016 um 09:42 schrieb Cornelia Huck: > > On Tue, 28 Jun 2016 10:03:21 +0300 > > "Michael S. Tsirkin" wrote: > > > >> I notice cleanup is a bit weird: > >> > >> virtio_queue_set_host_notifier_fd_handler(vq, false, false); > >> k->ioeventfd_assign(proxy, notifier, n, assign); > >> event_notifier_cleanup(notifier); > >> > >> I think virtio_queue_set_host_notifier_fd_handler should happen > >> after ioeventfd_assign for symmetry with init? > > Looking at the pre-rework code, ccw used the order now in common code, > > while pci and mmio used the order you suggest. > > > > "Switch the handler back, then unassign the transport's ioeventfd > > backing" made more sense to me (regardless of symmetry) - but we might > > lose a notification? > > > > Peter: Can you check whether your problem goes away if you switch the > > two lines around? > > > > The problem goes away, but its horribly slow. Maybe the lost notifications > you were thinking off. It points into that direction. > > diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c > index 1313760..7924a59 100644 > --- a/hw/virtio/virtio-bus.c > +++ b/hw/virtio/virtio-bus.c > @@ -176,9 +176,9 @@ static int set_host_notifier_internal(DeviceState *proxy, VirtioBusState *bus, > return r; > } > } else { > - virtio_queue_set_host_notifier_fd_handler(vq, false, false); > k->ioeventfd_assign(proxy, notifier, n, assign); The virtio_queue_...() should go here. > event_notifier_cleanup(notifier); > + virtio_queue_set_host_notifier_fd_handler(vq, false, false); > } > return r; > } > > Peter >