From: Stefan Hajnoczi <stefanha@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] docs/multiple-iothreads.txt: add documentation on IOThread programming
Date: Fri, 27 Jun 2014 12:07:32 +0200 [thread overview]
Message-ID: <20140627100732.GJ12061@stefanha-thinkpad.muc.redhat.com> (raw)
In-Reply-To: <5395C091.5010701@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1497 bytes --]
On Mon, Jun 09, 2014 at 04:11:29PM +0200, Paolo Bonzini wrote:
> >+The main loop and IOThreads
> >+---------------------------
> >+QEMU is an event-driven program that can do several things at once using an
> >+event loop. The VNC server and the QMP monitor are both processed from the
> >+same event loop which monitors their file descriptors until they become
> >+readable and then invokes a callback.
> >+
> >+The default event loop is called the main loop (see main-loop.c). It is
> >+possible to create additional event loop threads using -object
> >+iothread,id=my-iothread.
> >+
> >+Side note: The main loop and IOThread are both event loops but their code is
> >+not shared completely. Sometimes it is useful to remember that although they
> >+are conceptually similar they are currently not interchangeable.
>
> Actually, the main loop does include all the iothread code. So you could
> say that the main loop is a superset of the iothread.
Not quite. The main loop includes AioContext but it does not use
iothread.c (IOThread).
> >+ * LEGACY timer_new_ms() - create a timer
> >+ * LEGACY qemu_bh_new() - create a BH
> >+ * LEGACY qemu_aio_wait() - run an event loop iteration
>
> also seems to be unused except for qemu-io-cmds.c (and easily removed from
> there).
>
> Perhaps add a note (here or elsewhere) that timer_new_ms/qemu_bh_new should
> never be used in the block layer?
I'll note it further down where the block layer is mentioned.
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-06-27 10:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-09 13:59 [Qemu-devel] [PATCH] docs/multiple-iothreads.txt: add documentation on IOThread programming Stefan Hajnoczi
2014-06-09 14:11 ` Paolo Bonzini
2014-06-27 10:07 ` Stefan Hajnoczi [this message]
2014-06-09 15:29 ` Eric Blake
2014-06-27 9:59 ` Stefan Hajnoczi
2014-06-10 2:04 ` Fam Zheng
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=20140627100732.GJ12061@stefanha-thinkpad.muc.redhat.com \
--to=stefanha@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).