All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Emilio Cota <cota@braap.org>
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH 2/2] tcg: use QTree instead of GTree
Date: Wed, 11 Jan 2023 12:10:53 +0000	[thread overview]
Message-ID: <Y76nTaoek2kVtLqJ@redhat.com> (raw)
In-Reply-To: <20230111035536.309885-3-cota@braap.org>

On Tue, Jan 10, 2023 at 10:55:36PM -0500, Emilio Cota wrote:
> qemu-user can hang in a multi-threaded fork. One common
> reason is that when creating a TB, between fork and exec
> we manipulate a GTree whose memory allocator (GSlice) is
> not fork-safe.
> 
> Although POSIX does not mandate it, the system's allocator
> (e.g. tcmalloc, libc malloc) is probably fork-safe.
> 
> Fix some of these hangs by using QTree, which uses
> the system's allocator.
> 
> For more details, see:
>   https://gitlab.com/qemu-project/qemu/-/issues/285
> 
> Performance impact on linux-user:
> - ~2% slowdown in spec06
> - 1.05% slowdown in Nbench-int
> - 4.51% slowdown in Nbench-fp

What do you get *before* applying this patch, if you just run
linux-user with G_SLICE=always-malloc set ?

Also what libc impl were you testing with ? glibc or musl or something
else ?

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2023-01-11 12:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11  3:55 [PATCH 0/2] fix for #285 Emilio Cota
2023-01-11  3:55 ` [PATCH 1/2] util: import GTree as QTree Emilio Cota
2023-01-11 12:08   ` Daniel P. Berrangé
2023-01-29 22:28     ` Emilio Cota
2023-01-11  3:55 ` [PATCH 2/2] tcg: use QTree instead of GTree Emilio Cota
2023-01-11 12:10   ` Daniel P. Berrangé [this message]
2023-01-29 22:32     ` Emilio Cota
2023-01-11 12:34   ` Daniel P. Berrangé
2023-01-25 15:58     ` Daniel P. Berrangé
2023-01-29 22:38       ` Emilio Cota
2023-01-30  9:27         ` Daniel P. Berrangé
2023-01-30 19:09           ` Richard Henderson
2023-02-05 16:41             ` Emilio Cota
2023-01-11 12:26 ` [PATCH 0/2] fix for #285 Daniel P. Berrangé

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=Y76nTaoek2kVtLqJ@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=cota@braap.org \
    --cc=qemu-devel@nongnu.org \
    /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.