From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
Stefan Weil <sw@weilnetz.de>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll()
Date: Thu, 28 May 2015 14:01:34 +0200 [thread overview]
Message-ID: <5567039E.2020509@redhat.com> (raw)
In-Reply-To: <20150528114901.GF8461@dhcp-14-238.nay.redhat.com>
On 28/05/2015 13:49, Fam Zheng wrote:
> On Thu, 05/28 13:19, Paolo Bonzini wrote:
>>
>>
>> On 28/05/2015 13:16, Fam Zheng wrote:
>>>> On 28/05/2015 03:46, Fam Zheng wrote:
>>>>> The main context uses iohandler and aio_dispatch, neither calls
>>>>> aio_set_dispatching(). However, if we have [2], they can be changed to
>>>>> aio_poll(), then would this idea work?
>>>>
>>>> I think it's a bad idea to handle aio_poll for context B in a different
>>>> way, just because you have an outer aio_poll for context A...
>>>
>>> But we already do something similar: ignoring slirp, main_loop_wait() is like
>>> an iothread aio_poll() without the "outermost differentiation", while the
>>> current aio_poll() in bdrv_drain() is roughly "main_loop_wait() minus
>>> iohandlers".
>>
>> Right, but the two sets of iohandlers are stored in different places, so
>> it's obvious that you don't execute all of them. On the other hand,
>> examining global state in aio_poll is really bad.
>>
>
> OK.
>
> Would moving the ioeventfds to a new top level aio_loop_wait() be any better?
> That way no global state is needed.
If we need pause/resume anyway due to block/mirror.c's use of
block_job_defer_to_main_loop, I think this is not a problem anymore?
Paolo
next prev parent reply other threads:[~2015-05-28 12:01 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 ` [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll() Paolo Bonzini
2015-05-28 1:46 ` 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 [this message]
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=5567039E.2020509@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.