From: Peter Lieven <pl@kamp.de>
To: Cornelia Huck <cornelia.huck@de.ibm.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
famz@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] Regression: virtio-pci: convert to ioeventfd callbacks
Date: Tue, 28 Jun 2016 09:47:01 +0200 [thread overview]
Message-ID: <57722B75.9090406@kamp.de> (raw)
In-Reply-To: <20160628094245.0fefc484.cornelia.huck@de.ibm.com>
Am 28.06.2016 um 09:42 schrieb Cornelia Huck:
> On Tue, 28 Jun 2016 10:03:21 +0300
> "Michael S. Tsirkin" <mst@redhat.com> 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.
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);
event_notifier_cleanup(notifier);
+ virtio_queue_set_host_notifier_fd_handler(vq, false, false);
}
return r;
}
Peter
next prev parent reply other threads:[~2016-06-28 7:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-27 9:44 [Qemu-devel] Regression: virtio-pci: convert to ioeventfd callbacks Peter Lieven
2016-06-27 10:22 ` Cornelia Huck
2016-06-27 15:09 ` Cornelia Huck
2016-06-28 6:22 ` Peter Lieven
2016-06-28 7:25 ` Cornelia Huck
2016-06-28 7:03 ` Michael S. Tsirkin
2016-06-28 7:42 ` Cornelia Huck
2016-06-28 7:47 ` Peter Lieven [this message]
2016-06-28 7:59 ` Cornelia Huck
2016-06-28 8:16 ` Cornelia Huck
2016-06-28 9:20 ` Peter Lieven
2016-06-29 1:41 ` Jason Wang
2016-06-29 7:23 ` Cornelia Huck
2016-06-29 8:21 ` Jason Wang
2016-06-29 9:15 ` Cornelia Huck
2016-06-29 11:16 ` Cornelia Huck
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=57722B75.9090406@kamp.de \
--to=pl@kamp.de \
--cc=cornelia.huck@de.ibm.com \
--cc=famz@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).