From: Vlastimil Babka <vbabka@suse.cz>
To: "Christoph Lameter (Ampere)" <cl@gentwo.org>
Cc: lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org,
bpf <bpf@vger.kernel.org>, David Rientjes <rientjes@google.com>,
Hyeonggon Yoo <42.hyeyoo@gmail.com>,
"Uladzislau Rezki (Sony)" <urezki@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
Kees Cook <keescook@chromium.org>
Subject: Re: [LSF/MM/BPF TOPIC] SLUB allocator, mainly the sheaves caching layer
Date: Wed, 5 Mar 2025 11:26:20 +0100 [thread overview]
Message-ID: <b7723e7c-7422-4b68-af39-6a4f77c7d52c@suse.cz> (raw)
In-Reply-To: <ddcf9941-80c5-f2bd-1ef6-1336fe43272c@gentwo.org>
On 2/26/25 01:17, Christoph Lameter (Ampere) wrote:
>
> Let me just express my general concern. SLUB was written because SLAB
> became a Byzantine mess with layer upon layer of debugging and queues
I don't recall it having much debugging. IIRC it was behind some config that
nobody enabled. SLUB's debugging that can be dynamically enabled on boot is
so much better.
> here and there and with "maintenance" for these queues going on every 2
> seconds staggered on all processors. This caused a degree of OS noise that
> caused HPC jobs (and today we see similar issues with AI jobs) to not be
> able to accomplish a deterministic rendezvous. On some large machines
Yeah, I don't want to reintroduce this, hence sheaves intentionally don't
support NUMA restricted allocations so none of the flushed alien arrays are
necessary.
> we had ~10% of the whole memory vanish into one of the other queue on boot
> up with the customers being a bit upset were all the expensive memory
> went.
>
> It seems that were have nearly recreated the old nightmare again.
I don't see it that bleak.
> I would suggest rewriting the whole allocator once again trying to
> simplify things as much as possible and isolating specialized allocator
> functionality needed for some subsystems into different APIs.
Any specific suggestions? Some things are hard to isolate i.e. make them
work on top of the core allocator because not interacting with the internals
would not allow some useful functionality, or efficiency.
> The main allocation / free path needs to be as simple and as efficient as
> possible. It may not be possible to accomplish something like that given
> all the special casing that we have been pushing into it. Also consider the
I see some possibilities for simplification in not trying to support KASAN
together with slab_debug anymore. KASAN should be superior for that purpose
(of course you pay the extra cost) and it's tricky to not have it step on
each other's toes with slab_debug.
> runtime security measures and verification stuff that is on by default at
> runtime as well.
Yeah more and more hardening seems to be the current trend. But also not
realistically possible to isolate away from the core. I at least tried to
always compile all of it away completely when the respective CONFIG is not
enabled. OTOH I'd like to see some of that to support boot parameters (via
static keys etc) so it can be compiled in but not enabled. That would not
completely eliminate the overhead of passing e.g. the bucket parameter or
performing kmalloc random index evaluation, but would not allocate the
separate caches if not enabled, so the memory overhead of that would not be
imposed.
next prev parent reply other threads:[~2025-03-05 18:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 16:13 Vlastimil Babka
2025-02-24 18:02 ` Shakeel Butt
2025-02-24 18:15 ` Vlastimil Babka
2025-02-24 20:52 ` Shakeel Butt
2025-02-24 18:46 ` Mateusz Guzik
2025-02-24 21:12 ` Shakeel Butt
2025-02-24 22:21 ` Mateusz Guzik
2025-02-26 0:17 ` Christoph Lameter (Ampere)
2025-03-05 10:26 ` Vlastimil Babka [this message]
2025-03-25 17:43 ` Vlastimil Babka
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=b7723e7c-7422-4b68-af39-6a4f77c7d52c@suse.cz \
--to=vbabka@suse.cz \
--cc=42.hyeyoo@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cl@gentwo.org \
--cc=keescook@chromium.org \
--cc=linux-mm@kvack.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=rientjes@google.com \
--cc=urezki@gmail.com \
/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