From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Stefan Weil <sw@weilnetz.de>,
qemu-block@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll()
Date: Wed, 27 May 2015 11:38:57 +0200 [thread overview]
Message-ID: <556590B1.2040405@redhat.com> (raw)
In-Reply-To: <1432711146-28405-1-git-send-email-famz@redhat.com>
On 27/05/2015 09:19, Fam Zheng wrote:
> This series looks at the other side of the broken "qmp transaction" problem
> with dataplane [1] - the event loop.
>
> Before, an ioeventfd of a non-dataplane device is registered via
> qemu_set_fd_handler, which is only polled directly by main_loop_wait(), not in
> aio_poll(); an ioeventfd of a dataplane device (virtio-blk/virtio-scsi) is
> registered specially via aio_set_event_notifier, which is a wrapper of
> aio_set_fd_handler, thus it WILL be polled by all aio_poll().
>
> As explained in [1], and in patch 3, this is wrong. The handlers mustn't run.
>
> [1] Fixes it by unregistering them temporarily around such nested poll, while
> this series fixes it by skipping those file descriptors in all nested
> aio_poll(), just like how iohandler behaves in the main loop.
>
> On the one hand, it is simpler than [1]; on the other hand, this approach is
> also interesting because once we remove qemu_set_fd_handler2 [2], iohandler.c
> can be removed by converting all qemu_set_fd_handler to the new
> aio_set_io_event_notifier introduced in this series.
I don't think this can work.
Whenever the main context is doing synchronous work for dataplane, it is
in the outermost aio_poll.
Paolo
next prev parent reply other threads:[~2015-05-27 9:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-27 7:19 [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll() Fam Zheng
2015-05-27 7:19 ` [Qemu-devel] [RFC PATCH 1/4] aio-posix: Introduce aio_set_io_event_notifier Fam Zheng
2015-05-27 12:07 ` Eric Blake
2015-05-27 7:19 ` [Qemu-devel] [RFC PATCH 2/4] aio-win32: Implement aio_set_io_event_notifier Fam Zheng
2015-05-27 7:19 ` [Qemu-devel] [RFC PATCH 3/4] virtio-blk: Use aio_set_io_event_notifier in dataplane Fam Zheng
2015-05-27 12:10 ` Eric Blake
2015-05-27 7:19 ` [Qemu-devel] [RFC PATCH 4/4] virtio-scsi-dataplane: User aio_set_io_event_notifier Fam Zheng
2015-05-27 9:38 ` Paolo Bonzini [this message]
2015-05-28 1:46 ` [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll() Fam Zheng
2015-05-28 8:21 ` Paolo Bonzini
2015-05-28 11:16 ` Fam Zheng
2015-05-28 11:19 ` Paolo Bonzini
2015-05-28 11:49 ` Fam Zheng
2015-05-28 12:01 ` Paolo Bonzini
2015-05-28 12:26 ` Fam Zheng
2015-05-28 13:42 ` Paolo Bonzini
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=556590B1.2040405@redhat.com \
--to=pbonzini@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=sw@weilnetz.de \
/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).