Re: [PATCH RFC 2/8] mm, slab: introduce slab_debug=N

From: Harry Yoo

Date: Thu Sep 24 2026 - 12:02:21 EST


On Thu, Sep 24, 2026 at 03:48:43PM +0100, Harry Yoo wrote:
> On Wed, Sep 23, 2026 at 05:45:07PM +0200, Vlastimil Babka (SUSE) wrote:
> > Enabling slab_debug has the side-effect of disabling all percpu caching
> > of objects (now via sheaves), which can be sometimes useful for saving
> > memory for e.g. kdump kernels. To make this possible without the
> > overhead (CPU or memory) of actual debugging options such as poisoning,
> > introduce a No-op debug option that only forces the debugging slow paths
> > and zero sheaf capacity.
>
> Just to clarify, the intended behavior of slab_debug=- still
> does not change, right? (the name "No-op" could be confusing here I
> guess)
>
> And My LLM flagged an issue here (that I reviewed)
>
> Implementing it as debug flag has a few side effects:
>
> - pointer hashing will be disabled unless hash_pointers=always is
> specified. [+Cc: Kees]
>
> - Disable slab merging. Since this does not affect object metadata
> layout, this could be excluded.

excluded "from SLAB_NEVER_MERGE"
Obviously it should be still part of SLAB_MERGE_SAME though.