From: Paolo Bonzini <pbonzini@redhat.com>
To: "Li Qiang" <liq3ea@gmail.com>,
stefanha@redhat.com, fam@euphon.net,
"Qemu Developers" <qemu-devel@nongnu.org>, 李强 <liq3ea@163.com>
Subject: Re: [Qemu-devel] Question about aio_poll and glib aio_ctx_dispatch
Date: Wed, 19 Dec 2018 21:41:53 +0100 [thread overview]
Message-ID: <c3b72adf-86c0-6a45-026c-838e4b7187da@redhat.com> (raw)
In-Reply-To: <CAKXe6SK8SXVKZ23c+QNJLEGYOkY57ovFHKNwT3byTTZai3bdaw@mail.gmail.com>
On 19/12/18 11:05, Li Qiang wrote:
> Sent it to qemu-devel.
>
> Li Qiang <liq3ea@gmail.com <mailto:liq3ea@gmail.com>> 于2018年12月19日周
> 三 下午6:04写道:
>
> Hello Paolo, Stefan, Fam and all,
>
> Here I have a question about 'aio_poll'.
> IIUC the 'aio_poll' is (mostly) used for synchronous IO
> as I see a lot of code like this:
> while(condition)
> aio_poll();
>
> However it seems the 'aio_poll' and 'aio_ctx_dispatch' both poll the fd.
> So what happened when the 'fd' has events, which function will be
> wakeup?
Roughly speaking, aio_poll is used for synchronous IO and within I/O
threads; aio_ctx_dispatch is used within the main thread.
Both end up calling aio_dispatch_handlers and timerlistgroup_run_timers.
Paolo
next prev parent reply other threads:[~2018-12-19 20:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAKXe6SK+Pm8hGh=BXQ8FosVd=s4S+oc4moxJOjOq5HNeoG5Jcw@mail.gmail.com>
2018-12-19 10:05 ` [Qemu-devel] Question about aio_poll and glib aio_ctx_dispatch Li Qiang
2018-12-19 20:41 ` Paolo Bonzini [this message]
2018-12-19 22:58 ` [Qemu-devel] 答复: " Li Qiang
2018-12-20 1:25 ` [Qemu-devel] " Fam Zheng
2018-12-20 8:34 ` Li Qiang
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=c3b72adf-86c0-6a45-026c-838e4b7187da@redhat.com \
--to=pbonzini@redhat.com \
--cc=fam@euphon.net \
--cc=liq3ea@163.com \
--cc=liq3ea@gmail.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).