mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Harry Yoo <harry@kernel.org>
Cc: Hao Li <hao.li@linux.dev>, Christoph Lameter <cl@gentwo.org>,
	David Rientjes <rientjes@google.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Conor Dooley <conor@kernel.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 0/8] replace CONFIG_SLUB_TINY with a slab_tiny boot parameter
Date: Fri, 23 Oct 2026 10:14:50 +0200	[thread overview]
Message-ID: <8f09767b-004c-480f-a578-f2722ea4301d@kernel.org> (raw)
In-Reply-To: <arU956kfc1QpA7N-@thinkstation>

On 9/24/26 17:18, Harry Yoo wrote:
> On Wed, Sep 23, 2026 at 05:45:05PM +0200, Vlastimil Babka (SUSE) wrote:
>> To sum up, after this series:
>> 
>> - CONFIG_SLUB_TINY is a deprecated option that has no interaction with
>>   other options and only controls the default behavior.
>> 
>> - New slab_tiny boot parameter controls the functionality (and can
>>   override CONFIG_SLUB_TINY in both directions).
>>
>> - slab_debug=N can effectively achieve most of slab_tiny and on a
>>   per-cache basic
> 
> Allowing "slab_tiny=0" doesn't make much sense given that
> CONFIG_SLUB_TINY is deprecated anyway. I was assuming specifying
> "slab_tiny" would enable it and not specifying it would disable it
> unless CONFIG_SLUB_TINY is set.

I was anticipating a possible autodetection in the future - i.e. "is this
system so tiny we should do it?" and a way to override to =0 may be useful.

> Also it's bit confusing to have multiple ways to achieve the same thing.
> Is there a reason why we can't interpret "slab_debug=N" as
> "slab_tiny_enabled = 1" internally and drop "slab_tiny" boot parameter?

"slab_debug=N" is a weird parameter to control the whole slab_tiny (which
does more than the slab_debug part). In my view it exists as a side-effect
to how slab_tiny is implemented. But because slab_tiny is implemented using
that, I thought it might make sense to expose slab_debug=N separately too.
It might be even useful in some debug scenario.

Whoever wants to use slab_tiny doesn't even need to know about slab_debug.

>> - the implementation is simpler with many ifdefs removed
>> 
>> [1] https://lore.kernel.org/all/CAHk-=wh-k04MsoEC0SGKff2Snm6bBF_e+0pHOKwaWv4umZ_SnQ@mail.gmail.com/
>> 
>> Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
>> ---
>> Vlastimil Babka (SUSE) (8):
>>       mm, slab: refactor slab_min/max_order handling
>>       mm, slab: introduce slab_debug=N
>>       mm, slab: rework KMALLOC_RECLAIM handling of SLUB_TINY
>>       mm, slab: make SLUB_TINY handling dynamic for sizing decisions
>>       mm, slab: convert CONFIG_SLUB_TINY checks to kmem_cache_debug()
>>       mm, slab: remove remaining compile-time checks for CONFIG_SLUB_TINY
>>       mm, slab: add slab_tiny boot param
>>       mm, slab: deprecate CONFIG_SLUB_TINY and reduce its Kconfig effects
>> 
>>  Documentation/admin-guide/kernel-parameters.txt |   4 +
>>  Documentation/admin-guide/mm/slab.rst           |  18 ++-
>>  include/linux/slab.h                            |  17 +--
>>  lib/Kconfig.kasan                               |   2 +-
>>  mm/Kconfig                                      |  16 ++-
>>  mm/Kconfig.debug                                |   2 +-
>>  mm/slab.h                                       |  32 +++--
>>  mm/slab_common.c                                |  12 +-
>>  mm/slub.c                                       | 149 +++++++++++-------------
>>  9 files changed, 120 insertions(+), 132 deletions(-)
>> ---
>> base-commit: b4218126d498275444f315b0ed4cef6add6beabc
>> change-id: 20260911-slub_tiny_rework-8f2634dd17a7
>> 
> 


      reply	other threads:[~2026-10-23  8:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 15:45 Vlastimil Babka (SUSE)
2026-09-23 15:45 ` [PATCH RFC 1/8] mm, slab: refactor slab_min/max_order handling Vlastimil Babka (SUSE)
2026-09-23 15:45 ` [PATCH RFC 2/8] mm, slab: introduce slab_debug=N Vlastimil Babka (SUSE)
2026-09-24 14:48   ` Harry Yoo
2026-09-24 15:39     ` Harry Yoo
2026-10-23  8:04     ` Vlastimil Babka (SUSE)
2026-09-23 15:45 ` [PATCH RFC 3/8] mm, slab: rework KMALLOC_RECLAIM handling of SLUB_TINY Vlastimil Babka (SUSE)
2026-09-23 15:45 ` [PATCH RFC 4/8] mm, slab: make SLUB_TINY handling dynamic for sizing decisions Vlastimil Babka (SUSE)
2026-09-23 15:45 ` [PATCH RFC 5/8] mm, slab: convert CONFIG_SLUB_TINY checks to kmem_cache_debug() Vlastimil Babka (SUSE)
2026-09-23 15:45 ` [PATCH RFC 6/8] mm, slab: remove remaining compile-time checks for CONFIG_SLUB_TINY Vlastimil Babka (SUSE)
2026-09-23 15:45 ` [PATCH RFC 7/8] mm, slab: add slab_tiny boot param Vlastimil Babka (SUSE)
2026-09-24  7:26   ` Vlastimil Babka (SUSE)
2026-09-23 15:45 ` [PATCH RFC 8/8] mm, slab: deprecate CONFIG_SLUB_TINY and reduce its Kconfig effects Vlastimil Babka (SUSE)
2026-09-24 15:18 ` [PATCH RFC 0/8] replace CONFIG_SLUB_TINY with a slab_tiny boot parameter Harry Yoo
2026-10-23  8:14   ` Vlastimil Babka (SUSE) [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=8f09767b-004c-480f-a578-f2722ea4301d@kernel.org \
    --to=vbabka@kernel.org \
    --cc=cl@gentwo.org \
    --cc=conor@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=hao.li@linux.dev \
    --cc=harry@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    /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

all inboxes | Powered by JetHome®