[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGudoHEsq=1YDYYmN3uu_HMoVz0Rts1w=bkOYNP3084PsSdOSg@mail.gmail.com>
Date: Tue, 16 Dec 2025 19:19:53 +0100
From: Mateusz Guzik <mjguzik@...il.com>
To: Tycho Andersen <tycho@...nel.org>
Cc: oleg@...hat.com, brauner@...nel.org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, linux-mm@...ck.org, willy@...radead.org
Subject: Re: [PATCH v3 2/2] pid: only take pidmap_lock once on alloc
On Tue, Dec 16, 2025 at 6:09 PM Tycho Andersen <tycho@...nel.org> wrote:
> In a particularly pathological case I can get a substantial
> improvement in kernel CPU time with this patch:
>
> Before: Time (mean ± σ): 53.007 s ± 0.148 s [User: 430.891 s, System: 12406.459 s]
> After : Time (mean ± σ): 45.624 s ± 0.394 s [User: 435.021 s, System: 7692.072 s]
>
> across 10 different boots. Feel free to add
>
> Tested-by: Tycho Andersen (AMD) <tycho@...nel.org>
>
thanks for testing
> > + * (the routine unfortunately returns void, so we have no idea if it got anywhere).
>
> Is it worth changing the return type? The underlying function looks
> like it knows whether the allocation was actually successful...
>
willy says IDR is a stale api and the intent is to move consumers off
of it. the loop is already a result of not changing the api, see v1
which add preload for more than one buffer.
Whatever replacement should definitely indicate something like this if
preload exists for its case.
Powered by blists - more mailing lists