[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/5] aio: add a ThreadPool instance to AioContex
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 3/5] aio: add a ThreadPool instance to AioContext |
Date: |
Thu, 7 Mar 2013 11:02:52 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Mar 06, 2013 at 06:24:37PM +0100, Paolo Bonzini wrote:
> Il 06/03/2013 16:45, Stefan Hajnoczi ha scritto:
> > This patch adds a ThreadPool to AioContext. It's possible that some
> > AioContext instances will never use the ThreadPool, so defer creation
> > until aio_get_thread_pool().
>
> What lock should protect against doing this twice?
aio_get_thread_pool() is not thread-safe and I don't think it needs to
be. I imagine it will only be called from the thread that runs the
AioContext.
Stefan
- [Qemu-devel] [PATCH 0/5] threadpool: support multiple ThreadPools, Stefan Hajnoczi, 2013/03/06
- [Qemu-devel] [PATCH 3/5] aio: add a ThreadPool instance to AioContext, Stefan Hajnoczi, 2013/03/06
- [Qemu-devel] [PATCH 1/5] threadpool: move globals into struct ThreadPool, Stefan Hajnoczi, 2013/03/06
- [Qemu-devel] [PATCH 4/5] main-loop: add qemu_get_aio_context(), Stefan Hajnoczi, 2013/03/06
- [Qemu-devel] [PATCH 5/5] threadpool: drop global thread pool, Stefan Hajnoczi, 2013/03/06
- [Qemu-devel] [PATCH 2/5] threadpool: add thread_pool_new() and thread_pool_free(), Stefan Hajnoczi, 2013/03/06