diff mbox

Regression: virtio-pci: convert to ioeventfd callbacks

Message ID 20160628101618.57bdb1e0.cornelia.huck@de.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Cornelia Huck June 28, 2016, 8:16 a.m. UTC
On Tue, 28 Jun 2016 09:47:01 +0200
Peter Lieven <pl@kamp.de> wrote:

> The problem goes away, but its horribly slow. Maybe the lost notifications
> you were thinking off.

I have the following patch (works for me on ccw as well). I'm worried
about the slowness you're seeing, though. Is this just with an iscsi
backing?

From a62e1518fa9c8a68c27d6997d8ca8fccf6152d1e Mon Sep 17 00:00:00 2001
From: Cornelia Huck <cornelia.huck@de.ibm.com>
Date: Tue, 28 Jun 2016 10:04:52 +0200
Subject: [PATCH] virtio: deassign ioeventfd before resetting handler

We should unassign the transport's ioeventfd backing before
resetting the handler, or we may use notifications.

Pointed-out-by: Michael S. Tsirkin <mst@redhat.com>
Reported-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 hw/virtio/virtio-bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Lieven June 28, 2016, 9:20 a.m. UTC | #1
Am 28.06.2016 um 10:16 schrieb Cornelia Huck:
> On Tue, 28 Jun 2016 09:47:01 +0200
> Peter Lieven <pl@kamp.de> wrote:
>
>> The problem goes away, but its horribly slow. Maybe the lost notifications
>> you were thinking off.
> I have the following patch (works for me on ccw as well). I'm worried
> about the slowness you're seeing, though. Is this just with an iscsi
> backing?

Strange enough now neither my nor your version of the fix work for
me anymore...

I can only reproduce with iSCSI. Neither QCOW2, RAW or NBD work.

I think it could have to do with the iSCSI event handler.

Peter
diff mbox

Patch

diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c
index 1313760..32fcc64 100644
--- a/hw/virtio/virtio-bus.c
+++ b/hw/virtio/virtio-bus.c
@@ -176,8 +176,8 @@  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);
+        virtio_queue_set_host_notifier_fd_handler(vq, false, false);
         event_notifier_cleanup(notifier);
     }
     return r;