linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/23] common kmalloc for SLUB and SLAB v2
@ 2022-04-14  8:57 Hyeonggon Yoo
  2022-04-14  8:57 ` [PATCH v2 01/23] mm/slab: move NUMA-related code to __do_cache_alloc() Hyeonggon Yoo
                   ` (23 more replies)
  0 siblings, 24 replies; 51+ messages in thread
From: Hyeonggon Yoo @ 2022-04-14  8:57 UTC (permalink / raw)
  To: Vlastimil Babka
  Cc: Marco Elver, Matthew WilCox, Christoph Lameter, Pekka Enberg,
	David Rientjes, Joonsoo Kim, Andrew Morton, Hyeonggon Yoo,
	Roman Gushchin, linux-mm, linux-kernel

Changes since v1:
- The code is basically same, but split some patches to make it
easier to review.
- Adjusted comments and added Reviewed-by from Vlastimil. Thanks!

Hello, this series is cleanup of kmalloc code. After this series,
kmalloc subsystem is perfectly generalized on SLAB and SLUB.

This series is not small, but each patch is easy to review and
I bet you will like this :)

Many thanks to Matthew, Marco, Vlastimil who gave comments
in previous series.

Any feedbacks will be appreciated.
Thanks!

======== series description =======

patch 1-2 make slab_alloc_node() in SLAB available for non-NUMA
configurations for further cleanup.

patch 3-12 remove duplicate code in common kmalloc functions.

patch 13 makes SLAB pass requests larger than order-1 page to page
allocator. This is useful for further generalization.

patch 14-16 unify tracepoints. after them, we use only
kmem_cache_alloc and kmem_cache_free tracepoints in slab allocators.

patch 17-18 generalize whole kmalloc subsystem on SLAB/SLUB.

patch 19-20 factor out common code of __kmalloc_node()
and __kmalloc_node_track_caller().

patch 21 removes now unnecessary kmem_cache_alloc_node_trace().

patch 22-23 is small improvements of __ksize(). They are not part of
generalization but depends on this series.

Hyeonggon Yoo (23):
  mm/slab: move NUMA-related code to __do_cache_alloc()
  mm/slab: cleanup slab_alloc() and slab_alloc_node()
  mm/slab_common: remove CONFIG_NUMA ifdefs for common kmalloc functions
  mm/slab_common: cleanup kmalloc_track_caller()
  mm/slab_common: cleanup __kmalloc()
  mm/sl[auo]b: fold kmalloc_order_trace() into kmalloc_large()
  mm/slub: move kmalloc_large_node() to slab_common.c
  mm/slab_common: make kmalloc_large_node() consistent with
    kmalloc_large()
  mm/slab_common: cleanup kmalloc_large()
  mm/slab_common: cleanup kmem_cache_alloc{,node,lru}
  mm/slab_common: kmalloc_node: pass large requests to page allocator
  mm/slab_common: cleanup kmalloc()
  mm/slab: kmalloc: pass requests larger than order-1 page to page
    allocator
  mm/slab_common: print cache name in tracepoints
  mm/slab_common: use same tracepoint in kmalloc and normal caches
  mm/slab_common: rename tracepoint
  mm/slab_common: implement __kmem_cache_free()
  mm/sl[au]b: generalize kmalloc subsystem
  mm/slab_common: add kasan_kmalloc() in __kmalloc_node_track_caller()
  mm/slab_common: factor out __do_kmalloc_node()
  mm/sl[au]b: remove kmem_cache_alloc_node_trace()
  mm/sl[auo]b: move definition of __ksize() to mm/slab.h
  mm/sl[au]b: check if large object is valid in __ksize()

 include/linux/slab.h        | 245 ++++++++++++-------------
 include/trace/events/kmem.h | 109 ++---------
 mm/slab.c                   | 354 ++++++------------------------------
 mm/slab.h                   |   9 +
 mm/slab_common.c            | 146 ++++++++++++---
 mm/slob.c                   |  78 +++-----
 mm/slub.c                   | 264 ++-------------------------
 7 files changed, 350 insertions(+), 855 deletions(-)

-- 
2.32.0


^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2022-04-30 14:07 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-14  8:57 [PATCH v2 00/23] common kmalloc for SLUB and SLAB v2 Hyeonggon Yoo
2022-04-14  8:57 ` [PATCH v2 01/23] mm/slab: move NUMA-related code to __do_cache_alloc() Hyeonggon Yoo
2022-04-22 18:04   ` Vlastimil Babka
2022-04-14  8:57 ` [PATCH v2 02/23] mm/slab: cleanup slab_alloc() and slab_alloc_node() Hyeonggon Yoo
2022-04-25 14:05   ` Vlastimil Babka
2022-04-14  8:57 ` [PATCH v2 03/23] mm/slab_common: remove CONFIG_NUMA ifdefs for common kmalloc functions Hyeonggon Yoo
2022-04-25 14:41   ` Vlastimil Babka
2022-04-14  8:57 ` [PATCH v2 04/23] mm/slab_common: cleanup kmalloc_track_caller() Hyeonggon Yoo
2022-04-25 15:05   ` Vlastimil Babka
2022-04-26 15:49   ` Vlastimil Babka
2022-04-30 11:44     ` Hyeonggon Yoo
2022-04-14  8:57 ` [PATCH v2 05/23] mm/slab_common: cleanup __kmalloc() Hyeonggon Yoo
2022-04-26 16:02   ` Vlastimil Babka
2022-04-14  8:57 ` [PATCH v2 06/23] mm/sl[auo]b: fold kmalloc_order_trace() into kmalloc_large() Hyeonggon Yoo
2022-04-26 16:09   ` Vlastimil Babka
2022-04-14  8:57 ` [PATCH v2 07/23] mm/slub: move kmalloc_large_node() to slab_common.c Hyeonggon Yoo
2022-04-26 16:13   ` Vlastimil Babka
2022-04-14  8:57 ` [PATCH v2 08/23] mm/slab_common: make kmalloc_large_node() consistent with kmalloc_large() Hyeonggon Yoo
2022-04-26 17:15   ` Vlastimil Babka
2022-04-28  6:35     ` Hyeonggon Yoo
2022-04-14  8:57 ` [PATCH v2 09/23] mm/slab_common: cleanup kmalloc_large() Hyeonggon Yoo
2022-04-26 17:18   ` Vlastimil Babka
2022-04-14  8:57 ` [PATCH v2 10/23] mm/slab_common: cleanup kmem_cache_alloc{,node,lru} Hyeonggon Yoo
2022-04-26 18:01   ` Vlastimil Babka
2022-04-30 11:48     ` Hyeonggon Yoo
2022-04-14  8:57 ` [PATCH v2 11/23] mm/slab_common: kmalloc_node: pass large requests to page allocator Hyeonggon Yoo
2022-04-14  8:57 ` [PATCH v2 12/23] mm/slab_common: cleanup kmalloc() Hyeonggon Yoo
2022-04-26 18:00   ` Joe Perches
2022-04-28 11:30     ` Hyeonggon Yoo
2022-04-27  7:50   ` Vlastimil Babka
2022-04-14  8:57 ` [PATCH v2 13/23] mm/slab: kmalloc: pass requests larger than order-1 page to page allocator Hyeonggon Yoo
2022-04-27  8:10   ` Vlastimil Babka
2022-04-30 11:50     ` Hyeonggon Yoo
2022-04-14  8:57 ` [PATCH v2 14/23] mm/slab_common: print cache name in tracepoints Hyeonggon Yoo
2022-04-29 14:05   ` Vlastimil Babka
2022-04-30 14:06     ` Hyeonggon Yoo
2022-04-14  8:57 ` [PATCH v2 15/23] mm/slab_common: use same tracepoint in kmalloc and normal caches Hyeonggon Yoo
2022-04-14  8:57 ` [PATCH v2 16/23] mm/slab_common: rename tracepoint Hyeonggon Yoo
2022-04-14  8:57 ` [PATCH v2 17/23] mm/slab_common: implement __kmem_cache_free() Hyeonggon Yoo
2022-04-14  8:57 ` [PATCH v2 18/23] mm/sl[au]b: generalize kmalloc subsystem Hyeonggon Yoo
2022-04-29 14:30   ` Vlastimil Babka
2022-04-14  8:57 ` [PATCH v2 19/23] mm/slab_common: add kasan_kmalloc() in __kmalloc_node_track_caller() Hyeonggon Yoo
2022-04-14  8:57 ` [PATCH v2 20/23] mm/slab_common: factor out __do_kmalloc_node() Hyeonggon Yoo
2022-04-14 11:45   ` Hyeonggon Yoo
2022-04-29 14:48   ` Vlastimil Babka
2022-04-14  8:57 ` [PATCH v2 21/23] mm/sl[au]b: remove kmem_cache_alloc_node_trace() Hyeonggon Yoo
2022-04-14  8:57 ` [PATCH v2 22/23] mm/sl[auo]b: move definition of __ksize() to mm/slab.h Hyeonggon Yoo
2022-04-14  8:57 ` [PATCH v2 23/23] mm/sl[au]b: check if large object is valid in __ksize() Hyeonggon Yoo
2022-04-14  9:58   ` Christoph Lameter
2022-04-14 11:46     ` Hyeonggon Yoo
2022-04-14 12:36 ` [PATCH v2 00/23] common kmalloc for SLUB and SLAB v2 Hyeonggon Yoo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).