qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC 0/3] iothread: release iothread around aio_p


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH RFC 0/3] iothread: release iothread around aio_poll
Date: Tue, 31 Mar 2015 15:03:53 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

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: pgp4T7WYh6pOi.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]