From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v2 4/4] coroutine: pool coroutines to speed up creation
Date: Thu, 12 May 2011 12:13:06 +0200 [thread overview]
Message-ID: <4DCBB2B2.6070307@redhat.com> (raw)
In-Reply-To: <1305194086-9832-5-git-send-email-stefanha@linux.vnet.ibm.com>
terAm 12.05.2011 11:54, schrieb Stefan Hajnoczi:
> This patch speeds up coroutine creation by reusing freed coroutines.
> When a coroutine terminates it is placed in the pool instead of having
> its resources freed. The next time a coroutine is created it can be
> taken straight from the pool and requires no initialization.
>
> Performance results on an Intel Core2 Duo T9400 (2.53GHz) for
> ./check-coroutine --benchmark-lifecycle 20000000:
>
> No pooling: 19.5 sec
> With pooling: 1.1 sec
>
> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> ---
> check-coroutine.c | 2 ++
> qemu-coroutine-int.h | 2 ++
> qemu-coroutine.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++---
> qemu-coroutine.h | 9 +++++++++
> vl.c | 2 ++
> 5 files changed, 61 insertions(+), 3 deletions(-)
>
> diff --git a/check-coroutine.c b/check-coroutine.c
> index 5a42c49..223c50c 100644
> --- a/check-coroutine.c
> +++ b/check-coroutine.c
> @@ -218,6 +218,8 @@ int main(int argc, char **argv)
> };
> int i;
>
> + qemu_coroutine_init();
Can we use module_init instead of adding an explicit call to main()?
This would prevent forgetting to add it in qemu-img and qemu-io like in
this patch.
Kevin
next prev parent reply other threads:[~2011-05-12 10:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-12 9:54 [Qemu-devel] [PATCH v2 0/4] Coroutines for better asynchronous programming Stefan Hajnoczi
2011-05-12 9:54 ` [Qemu-devel] [PATCH v2 1/4] coroutine: introduce coroutines Stefan Hajnoczi
2011-05-12 18:12 ` Blue Swirl
2011-05-12 19:22 ` Stefan Hajnoczi
2011-05-13 8:17 ` Kevin Wolf
2011-05-12 9:54 ` [Qemu-devel] [PATCH v2 2/4] coroutine: add check-coroutine automated tests Stefan Hajnoczi
2011-05-12 9:54 ` [Qemu-devel] [PATCH v2 3/4] coroutine: add check-coroutine --benchmark-lifecycle Stefan Hajnoczi
2011-05-12 9:54 ` [Qemu-devel] [PATCH v2 4/4] coroutine: pool coroutines to speed up creation Stefan Hajnoczi
2011-05-12 10:13 ` Kevin Wolf [this message]
2011-05-12 10:22 ` Stefan Hajnoczi
2011-05-12 10:38 ` Kevin Wolf
2011-05-12 11:12 ` Paolo Bonzini
2011-05-12 11:15 ` Stefan Hajnoczi
2011-05-12 11:18 ` Paolo Bonzini
2011-05-12 11:52 ` 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=4DCBB2B2.6070307@redhat.com \
--to=kwolf@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=jvrao@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.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).