From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/5] aio: add a ThreadPool instance to AioContext
Date: Wed, 06 Mar 2013 18:24:37 +0100 [thread overview]
Message-ID: <51377BD5.3060500@redhat.com> (raw)
In-Reply-To: <1362584735-30911-4-git-send-email-stefanha@redhat.com>
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?
> The reason why AioContext should have the ThreadPool is because the
> ThreadPool is bound to a AioContext instance where the work item's
> callback function is invoked. It doesn't make sense to keep the
> ThreadPool pointer anywhere other than AioContext. For example,
> block/raw-posix.c can get its AioContext's ThreadPool and submit work.
>
> Special note about headers: I used struct ThreadPool in aio.h because
> there is a circular dependency if aio.h includes thread-pool.h.
Otherwise,
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo
next prev parent reply other threads:[~2013-03-06 17:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 15:45 [Qemu-devel] [PATCH 0/5] threadpool: support multiple ThreadPools Stefan Hajnoczi
2013-03-06 15:45 ` [Qemu-devel] [PATCH 1/5] threadpool: move globals into struct ThreadPool Stefan Hajnoczi
2013-03-06 17:25 ` Paolo Bonzini
2013-03-08 3:18 ` Wenchao Xia
2013-03-06 15:45 ` [Qemu-devel] [PATCH 2/5] threadpool: add thread_pool_new() and thread_pool_free() Stefan Hajnoczi
2013-03-06 16:36 ` Paolo Bonzini
2013-03-06 15:45 ` [Qemu-devel] [PATCH 3/5] aio: add a ThreadPool instance to AioContext Stefan Hajnoczi
2013-03-06 17:24 ` Paolo Bonzini [this message]
2013-03-07 10:02 ` Stefan Hajnoczi
2013-03-06 15:45 ` [Qemu-devel] [PATCH 4/5] main-loop: add qemu_get_aio_context() Stefan Hajnoczi
2013-03-06 17:26 ` Paolo Bonzini
2013-03-06 15:45 ` [Qemu-devel] [PATCH 5/5] threadpool: drop global thread pool Stefan Hajnoczi
2013-03-06 16:35 ` Paolo Bonzini
2013-03-07 10:07 ` Stefan Hajnoczi
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=51377BD5.3060500@redhat.com \
--to=pbonzini@redhat.com \
--cc=kwolf@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.