qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] linux-user,bsd-user: re-exec with G_SLICE=always-malloc


From: Alex Bennée
Subject: Re: [PATCH] linux-user,bsd-user: re-exec with G_SLICE=always-malloc
Date: Thu, 01 Dec 2022 10:49:27 +0000
User-agent: mu4e 1.9.3; emacs 29.0.60

Emilio Cota <cota@braap.org> writes:

> On Tue, Oct 04, 2022 at 13:00:47 +0100, Daniel P. Berrangé wrote:
> (snip)
>> Can't say I especially like this but I'm out of other ideas for how
>> to guarantee a solution. Users can't set env vars prior to launching
>> QEMU user emulators when using binfmt.
>
> An alternative is to not use GSlice between fork/exec. I'm
> not sure if within that region there are other users besides
> GTree (GArray perhaps?), but if there aren't, then just using
> a different binary tree implementation should do.

Hmm my distros version of GArray certainly does and that is used quite
heavily across gdbstub and plugins.

>
> Untested patches using ccan's AVL tree: 
>   https://github.com/cota/qemu/commits/avl
>
> Would that be more palatable?

I think generally we wouldn't want to have multiple implementations
unless there was a definite benefit (c.f. QHT). That said I think
Richard's latest optimisation work:

  Subject: [PATCH v2 0/7] accel/tcg: Rewrite user-only vma tracking
  Date: Thu, 27 Oct 2022 22:12:51 +1100
  Message-Id: <20221027111258.348196-1-richard.henderson@linaro.org>

brings in the kernel's interval tree (with unit tests). I wonder if the
page_collection use of GTree could be converted to that?

I don't know how you would defend against re-introducing it into
linux-user though aside from commentary.

>
> Thanks,
>               Emilio


-- 
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]