Re: [PATCH] mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED

Hyeonggon Yoo <[email protected]>
Newsgroups gmane.linux.ports.tegra,gmane.linux.kernel.arc,gmane.linux.ports.arm.kernel,gmane.linux.ports.arm.omap,gmane.linux.kernel.renesas-soc,gmane.linux.ports.mips,gmane.linux.ports.parisc,gmane.linux.ports.ppc64.devel,gmane.linux.ports.sh.devel,gmane.linux.ports.sparc,gmane.linux.uml.devel,gmane.linux.kernel.mm
Message-ID <CAB=+i9RycsnDbJ1f1jTiJ6fXnGUmH95h23G37Ss6XNAA3VJ3_w@mail.gmail.com>
On Tue, May 23, 2023 at 6:12 PM Vlastimil Babka <[email protected]> wrote:
>
> As discussed at LSF/MM [1] [2] and with no objections raised there,
> deprecate the SLAB allocator. Rename the user-visible option so that
> users with CONFIG_SLAB=y get a new prompt with explanation during make
> oldconfig, while make olddefconfig will just switch to SLUB.
>
> In all defconfigs with CONFIG_SLAB=y remove the line so those also
> switch to SLUB. Regressions due to the switch should be reported to
> linux-mm and slab maintainers.
>
> [1] https://lore.kernel.org/all/[email protected]/
> [2] https://lwn.net/Articles/932201/
>
> Signed-off-by: Vlastimil Babka <[email protected]>
> ---

<snip>

> diff --git a/mm/Kconfig b/mm/Kconfig
> index 7672a22647b4..b537c4436d18 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -218,11 +218,18 @@ choice
>         help
>            This option allows to select a slab allocator.
>
> -config SLAB
> -       bool "SLAB"
> +config SLAB_DEPRECATED
> +       bool "SLAB (DEPRECATED)"
>         depends on !PREEMPT_RT
>         select HAVE_HARDENED_USERCOPY_ALLOCATOR
>         help
> +         Deprecated and scheduled for removal in a few cycles. Replaced by
> +         SLUB.
> +
> +         If you cannot migrate to SLUB, please contact [email protected]
> +         and the people listed in the SLAB ALLOCATOR section of MAINTAINERS
> +         file, explaining why.
> +
>           The regular slab allocator that is established and known to work
>           well in all environments. It organizes cache hot objects in
>           per cpu and per node queues.
> @@ -240,6 +247,11 @@ config SLUB
>
>  endchoice
>
> +config SLAB
> +       bool
> +       default y
> +       depends on SLAB_DEPRECATED
> +
>  config SLUB_TINY
>         bool "Configure SLUB for minimal memory footprint"
>         depends on SLUB && EXPERT
> --
> 2.40.1

Thank you for the work!
It looks good to me.
let's see some users raise their voice.

Acked-by: Hyeonggon Yoo <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.