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 2/5] threadpool: add thread_pool_new() and thread_pool_free()
Date: Wed, 06 Mar 2013 17:36:28 +0100 [thread overview]
Message-ID: <5137708C.8070905@redhat.com> (raw)
In-Reply-To: <1362584735-30911-3-git-send-email-stefanha@redhat.com>
Il 06/03/2013 16:45, Stefan Hajnoczi ha scritto:
> + if (pool->ctx) {
> + aio_set_event_notifier(pool->ctx, &pool->notifier, NULL, NULL);
> + } else {
> + qemu_aio_set_event_notifier(&pool->notifier, NULL, NULL);
> + }
I have the same complaint about ->ctx here. I think it's nicer to pick
the right context in the creation function rather than every time you
use pool->ctx (allowing to pass in NULL is fine).
Also, when you drop the global ThreadPool each pool is guaranteed to
have an AioContext and the special casing can be dropped completely.
Paolo
next prev parent reply other threads:[~2013-03-06 16:36 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 [this message]
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
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=5137708C.8070905@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.