All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] configure: Add support for tcmalloc
Date: Thu, 26 Mar 2015 13:53:32 +0100	[thread overview]
Message-ID: <20150326125332.GA3932@noname.redhat.com> (raw)
In-Reply-To: <1427338992-27057-1-git-send-email-famz@redhat.com>

Am 26.03.2015 um 04:03 hat Fam Zheng geschrieben:
> This adds "--enable-tcmalloc" and "--disable-tcmalloc" to allow linking
> to libtcmalloc from gperftools.
> 
> tcmalloc is a malloc implementation that works well with threads and is
> fast, so it is good for performance.
> 
> It is disabled by default, because the MALLOC_PERTURB_ flag we use in
> tests doesn't work with tcmalloc. However we can enable tcmalloc
> specific heap checker and profilers later.
> 
> An IOPS gain can be observed with virtio-blk-dataplane, other parts of
> QEMU will directly benefit from it as well:
> 
> ==========================================================
>                        glibc malloc
> ----------------------------------------------------------
> rw         bs         iodepth    bw     iops       latency
> read       4k         1          150    38511      24
> ----------------------------------------------------------
> 
> ==========================================================
>                          tcmalloc
> ----------------------------------------------------------
> rw         bs         iodepth    bw     iops       latency
> read       4k         1          156    39969      23
> ----------------------------------------------------------
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  configure | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/configure b/configure
> index 589798e..03ba305 100755
> --- a/configure
> +++ b/configure
> @@ -336,6 +336,7 @@ libssh2=""
>  vhdx=""
>  quorum=""
>  numa=""
> +tcmalloc="no"
>  
>  # parse CC options first
>  for opt do
> @@ -1134,6 +1135,10 @@ for opt do
>    ;;
>    --enable-numa) numa="yes"
>    ;;
> +  --disable-tcmalloc) tcmalloc="no"
> +  ;;
> +  --enable-tcmalloc) tcmalloc="yes"
> +  ;;
>    *)
>        echo "ERROR: unknown option $opt"
>        echo "Try '$0 --help' for more information"
> @@ -1407,6 +1412,8 @@ Advanced options (experts only):
>    --enable-quorum          enable quorum block filter support
>    --disable-numa           disable libnuma support
>    --enable-numa            enable libnuma support
> +  --disable-tcmalloc       disable tcmalloc support
> +  --enable-numa            enable tcmalloc support

Almost. :-)

Kevin

  reply	other threads:[~2015-03-26 12:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26  3:03 [Qemu-devel] [PATCH] configure: Add support for tcmalloc Fam Zheng
2015-03-26 12:53 ` Kevin Wolf [this message]
2015-03-26 13:14   ` Paolo Bonzini

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=20150326125332.GA3932@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=famz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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.