linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Xie <xiehuan09@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	patches@lists.linux.dev
Subject: Re: [PATCH] mm: remove all the slab allocators
Date: Sun, 2 Apr 2023 13:09:31 +0800	[thread overview]
Message-ID: <CAEr6+EBK1WUq0U9n3VwhU1+=F5X7-654v0XwqHtENOt98HU0gw@mail.gmail.com> (raw)
In-Reply-To: <20230401094658.11146-1-vbabka@suse.cz>

On Sat, Apr 1, 2023 at 5:47 PM Vlastimil Babka <vbabka@suse.cz> wrote:
>
> As the SLOB removal is on track and the SLAB removal is planned, I have
> realized - why should we stop there and not remove also SLUB? What's a
> slab allocator good for in 2023? The RAM sizes are getting larger and
> the modules cheaper [1]. The object constructor trick was perhaps
> interesting in 1994, but not with contemporary CPUs. So all the slab
> allocator does today is just adding an unnecessary layer of complexity
> over the page allocator.
>
> Thus, with this patch, all three slab allocators are removed, and only a
> layer that passes everything to the page allocator remains in the slab.h
> and mm/slab_common.c files. This will allow users to gradually
> transition away and use the page allocator directly. To summarize the
> advantages:
>
> - Less code to maintain: over 13k lines are removed by this patch, and
>   more could be removed if I wast^Wspent more time on this, and later as
>   users are transitioned from the legacy layer. This no longer needs a
>   separate subsystem so remove it from MAINTAINERS (I hope I can keep the
>   kernel.org account anyway, though).
>
> - Simplified MEMCG_KMEM accounting: while I was lazy and just marked it
>   BROKEN in this patch, it should be trivial to use the page memcg
>   accounting now that we use the page allocator. The per-object
>   accounting went through several iterations in the past and was always
>   complex and added overhead. Page accounting is much simpler by
>   comparison.
>
> - Simplified KASAN and friends: also was lazy in this patch so they
>   can't be enabled but should be easy to fix up and work just on the
>   page level.
>
> - Simpler debugging: just use debug_pagealloc=on, no need to look up the
>   exact syntax of the absurdly complex slub_debug parameter.

This really simplifies the complexity of dealing with memory problems
in the production environment,
 and I hope it can be merged into the linux kernel soon.

Acked-by: Jeff Xie <xiehuan09@gmail.com>

-- 
Thanks,
JeffXie


  parent reply	other threads:[~2023-04-02  5:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-01  9:46 Vlastimil Babka
2023-04-01 10:00 ` Lorenzo Stoakes
2023-04-01 10:25 ` Yosry Ahmed
2023-04-01 11:33 ` Petr Tesařík
2023-04-01 11:38 ` Vlastimil Babka
2023-04-01 15:15 ` Matthew Wilcox
2023-04-01 18:33 ` David Laight
2023-04-01 18:45   ` Christophe Leroy
2023-04-01 22:04     ` David Laight
2023-04-02  5:09 ` Jeff Xie [this message]
2023-04-02  9:09 ` 郭辉
2023-04-02 11:04   ` Matthew Wilcox
2023-04-03  3:51     ` Fabio M. De Francesco
2023-04-03  4:04       ` Fabio M. De Francesco
2023-04-03  4:13       ` Matthew Wilcox

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='CAEr6+EBK1WUq0U9n3VwhU1+=F5X7-654v0XwqHtENOt98HU0gw@mail.gmail.com' \
    --to=xiehuan09@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=patches@lists.linux.dev \
    --cc=vbabka@suse.cz \
    /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