|
|
Subscribe / Log in / New account

remove SLOB and allow kfree() with kmem_cache_alloc()

From:  Vlastimil Babka <vbabka-AT-suse.cz>
To:  Christoph Lameter <cl-AT-linux.com>, David Rientjes <rientjes-AT-google.com>, Joonsoo Kim <iamjoonsoo.kim-AT-lge.com>, Pekka Enberg <penberg-AT-kernel.org>
Subject:  [PATCH 0/7] remove SLOB and allow kfree() with kmem_cache_alloc()
Date:  Fri, 10 Mar 2023 11:32:02 +0100
Message-ID:  <20230310103210.22372-1-vbabka@suse.cz>
Cc:  Hyeonggon Yoo <42.hyeyoo-AT-gmail.com>, Roman Gushchin <roman.gushchin-AT-linux.dev>, Andrew Morton <akpm-AT-linux-foundation.org>, linux-mm-AT-kvack.org, rcu-AT-vger.kernel.org, linux-fsdevel-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, patches-AT-lists.linux.dev, netdev-AT-vger.kernel.org, linux-doc-AT-vger.kernel.org, Vlastimil Babka <vbabka-AT-suse.cz>, "David S. Miller" <davem-AT-davemloft.net>, Eric Dumazet <edumazet-AT-google.com>, Frederic Weisbecker <frederic-AT-kernel.org>, Jakub Kicinski <kuba-AT-kernel.org>, Joel Fernandes <joel-AT-joelfernandes.org>, Jonathan Corbet <corbet-AT-lwn.net>, Josh Triplett <josh-AT-joshtriplett.org>, Lai Jiangshan <jiangshanlai-AT-gmail.com>, Mathieu Desnoyers <mathieu.desnoyers-AT-efficios.com>, Mike Rapoport <rppt-AT-kernel.org>, Neeraj Upadhyay <quic_neeraju-AT-quicinc.com>, Paolo Abeni <pabeni-AT-redhat.com>, "Paul E. McKenney" <paulmck-AT-kernel.org>, Steven Rostedt <rostedt-AT-goodmis.org>
Archive-link:  Article

Also in git:
https://git.kernel.org/vbabka/h/slab-remove-slob-v1r1

The SLOB allocator was deprecated in 6.2 so I think we can start
exposing the complete removal in for-next and aim at 6.4 if there are no
complaints.

Besides code cleanup, the main immediate benefit will be allowing
kfree() family of function to work on kmem_cache_alloc() objects (Patch
7), which was incompatible with SLOB.

This includes kfree_rcu() so I've updated the comment there to remove
the mention of potential future addition of kmem_cache_free_rcu() as
there should be no need for that now.

Otherwise it's straightforward. Patch 2 is a cleanup in net area, that I
can either handle in slab tree or submit in net after SLOB is removed.
Another cleanup in tomoyo is already in the tomoyo tree as that didn't
need to wait until SLOB removal.

Vlastimil Babka (7):
  mm/slob: remove CONFIG_SLOB
  net: skbuff: remove SLOB-specific ifdefs
  mm, page_flags: remove PG_slob_free
  mm, pagemap: remove SLOB and SLQB from comments and documentation
  mm/slab: remove CONFIG_SLOB code from slab common code
  mm/slob: remove slob.c
  mm/slab: document kfree() as allowed for kmem_cache_alloc() objects

 Documentation/admin-guide/mm/pagemap.rst     |   6 +-
 Documentation/core-api/memory-allocation.rst |  15 +-
 fs/proc/page.c                               |   5 +-
 include/linux/page-flags.h                   |   4 -
 include/linux/rcupdate.h                     |   6 +-
 include/linux/slab.h                         |  39 -
 init/Kconfig                                 |   2 +-
 kernel/configs/tiny.config                   |   1 -
 mm/Kconfig                                   |  22 -
 mm/Makefile                                  |   1 -
 mm/slab.h                                    |  61 --
 mm/slab_common.c                             |   7 +-
 mm/slob.c                                    | 757 -------------------
 net/core/skbuff.c                            |  16 -
 tools/mm/page-types.c                        |   6 +-
 15 files changed, 23 insertions(+), 925 deletions(-)
 delete mode 100644 mm/slob.c

-- 
2.39.2



Copyright © 2023, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds