linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mateusz Guzik <mjguzik@gmail.com>
To: Tycho Andersen <tycho@kernel.org>
Cc: oleg@redhat.com, brauner@kernel.org,
	linux-kernel@vger.kernel.org,  akpm@linux-foundation.org,
	linux-mm@kvack.org, willy@infradead.org
Subject: Re: [PATCH v3 2/2] pid: only take pidmap_lock once on alloc
Date: Tue, 16 Dec 2025 19:19:53 +0100	[thread overview]
Message-ID: <CAGudoHEsq=1YDYYmN3uu_HMoVz0Rts1w=bkOYNP3084PsSdOSg@mail.gmail.com> (raw)
In-Reply-To: <aUGSO68Am0VWVAuv@tycho.pizza>

On Tue, Dec 16, 2025 at 6:09 PM Tycho Andersen <tycho@kernel.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@kernel.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.


      reply	other threads:[~2025-12-16 18:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-06 13:19 [PATCH v3 0/2] further damage-control lack of clone scalability Mateusz Guzik
2025-12-06 13:19 ` [PATCH v3 1/2] ns: pad refcount Mateusz Guzik
2025-12-06 13:19 ` [PATCH v3 2/2] pid: only take pidmap_lock once on alloc Mateusz Guzik
2025-12-07  7:21   ` Matthew Wilcox
2025-12-07  9:21     ` Mateusz Guzik
2025-12-07 10:37       ` David Laight
2025-12-16 17:09   ` Tycho Andersen
2025-12-16 18:19     ` Mateusz Guzik [this message]

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='CAGudoHEsq=1YDYYmN3uu_HMoVz0Rts1w=bkOYNP3084PsSdOSg@mail.gmail.com' \
    --to=mjguzik@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=oleg@redhat.com \
    --cc=tycho@kernel.org \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox