From: Stefan Hajnoczi <stefanha@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH RFC 0/3] iothread: release iothread around aio_poll
Date: Tue, 31 Mar 2015 15:03:53 +0100 [thread overview]
Message-ID: <20150331140353.GA27156@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1424449612-18215-1-git-send-email-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1698 bytes --]
On Fri, Feb 20, 2015 at 05:26:49PM +0100, Paolo Bonzini wrote:
> Right now, iothreads are relying on a "contention callback" to release
> the AioContext (e.g. for block device operations or to do bdrv_drain_all).
> This is necessary because aio_poll needs to be called within an
> aio_context_acquire.
>
> This series drops this requirement for aio_poll, with two effects:
>
> 1) it makes it possible to remove the "contention callback" in RFifoLock
> (and possibly to convert it to a normal GRecMutex, which is why I am not
> including a patch to remove callbacks from RFifoLock).
>
> 2) it makes it possible to start work around making critical sections
> for the block layer fine-grained.
>
> In order to do this, some data is moved from AioContext to local storage.
> Stack allocation has size limitations, so thread-local storage is used
> instead. There are no reentrancy problems because the data is only live
> throughout a small part of aio_poll, and in particular not during the
> invocation of callbacks.
>
> Comments?
>
> Paolo
>
> Paolo Bonzini (3):
> aio-posix: move pollfds to thread-local storage
> AioContext: acquire/release AioContext during aio_poll
> iothread: release iothread around aio_poll
>
> aio-posix.c | 86 ++++++++++++++++++++++++++++++++++++++++-------------
> aio-win32.c | 8 +++++
> async.c | 10 +------
> include/block/aio.h | 18 +++++------
> iothread.c | 11 ++-----
> tests/test-aio.c | 21 +++++++------
> 6 files changed, 96 insertions(+), 58 deletions(-)
Thanks, applied to my block-next tree:
https://github.com/stefanha/qemu/commits/block-next
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2015-03-31 14:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 16:26 [Qemu-devel] [PATCH RFC 0/3] iothread: release iothread around aio_poll Paolo Bonzini
2015-02-20 16:26 ` [Qemu-devel] [PATCH 1/3] aio-posix: move pollfds to thread-local storage Paolo Bonzini
2015-03-06 16:50 ` Stefan Hajnoczi
2015-02-20 16:26 ` [Qemu-devel] [PATCH 2/3] AioContext: acquire/release AioContext during aio_poll Paolo Bonzini
2015-02-25 5:45 ` Fam Zheng
2015-02-26 13:21 ` Paolo Bonzini
2015-03-06 17:15 ` Stefan Hajnoczi
2015-07-08 2:18 ` Fam Zheng
2015-07-08 7:52 ` Paolo Bonzini
2015-02-20 16:26 ` [Qemu-devel] [PATCH 3/3] iothread: release iothread around aio_poll Paolo Bonzini
2015-03-06 17:16 ` Stefan Hajnoczi
2015-03-31 10:35 ` [Qemu-devel] [PATCH RFC 0/3] " Paolo Bonzini
2015-03-31 14:33 ` Stefan Hajnoczi
2015-04-21 15:40 ` Stefan Hajnoczi
2015-04-21 15:54 ` Paolo Bonzini
2015-04-22 10:26 ` Stefan Hajnoczi
2015-03-31 14:03 ` Stefan Hajnoczi [this message]
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=20150331140353.GA27156@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=famz@redhat.com \
--cc=pbonzini@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).