[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] tcg: use QTree instead of GTree
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH 2/2] tcg: use QTree instead of GTree |
Date: |
Wed, 11 Jan 2023 12:10:53 +0000 |
User-agent: |
Mutt/2.2.9 (2022-11-12) |
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 :|
Re: [PATCH 0/2] fix for #285, Daniel P . Berrangé, 2023/01/11