linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] cleanup of SLAB_ flags
@ 2024-02-23 18:27 Vlastimil Babka
  2024-02-23 18:27 ` [PATCH v2 1/3] mm, slab: deprecate SLAB_MEM_SPREAD flag Vlastimil Babka
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Vlastimil Babka @ 2024-02-23 18:27 UTC (permalink / raw)
  To: Christoph Lameter, Pekka Enberg, David Rientjes, Joonsoo Kim,
	Andrew Morton, Roman Gushchin, Hyeonggon Yoo, Andrey Ryabinin,
	Alexander Potapenko, Andrey Konovalov, Dmitry Vyukov,
	Vincenzo Frascino
  Cc: Zheng Yejian, Xiongwei Song, Chengming Zhou, linux-mm,
	linux-kernel, kasan-dev, Vlastimil Babka, Steven Rostedt

This started by the report that SLAB_MEM_SPREAD flag is dead (Patch 1).
Then in the alloc profiling series we realized it's too easy to reuse an
existing SLAB_ flag's value when defining a new one, by mistake.
Thus let the compiler do that for us via a new helper enum (Patch 2).
When checking if more flags are dead or could be removed, didn't spot
any, but found out the SLAB_KASAN handling of preventing cache merging
can be simplified since we now have an explicit SLAB_NO_MERGE (Patch 3).

The SLAB_MEM_SPREAD flag is now marked as unused and for removal, and
has a value of 0 so it's a no-op. Patches to remove its usage can/will
be submitted to respective subsystems independently of this series - the
flag is already dead as of v6.8-rc1 with SLAB removed. The removal of
dead cpuset_do_slab_mem_spread() code can also be submitted
independently.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
Changes in v2:
- Collect R-b, T-b (thanks!)
- Unify all disabled flags's value to a sparse-happy zero with a new macro (lkp/sparse).
- Rename __SF_BIT to __SLAB_FLAG_BIT (Roman Gushchin)
- Rewrod kasan_cache_create() comment (Andrey Konovalov)
- Link to v1: https://lore.kernel.org/r/20240220-slab-cleanup-flags-v1-0-e657e373944a@suse.cz

---
Vlastimil Babka (3):
      mm, slab: deprecate SLAB_MEM_SPREAD flag
      mm, slab: use an enum to define SLAB_ cache creation flags
      mm, slab, kasan: replace kasan_never_merge() with SLAB_NO_MERGE

 include/linux/kasan.h |  6 ----
 include/linux/slab.h  | 97 ++++++++++++++++++++++++++++++++++++---------------
 mm/kasan/generic.c    | 22 ++++--------
 mm/slab.h             |  1 -
 mm/slab_common.c      |  2 +-
 mm/slub.c             |  6 ++--
 6 files changed, 79 insertions(+), 55 deletions(-)
---
base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
change-id: 20240219-slab-cleanup-flags-c864415ecc8e

Best regards,
-- 
Vlastimil Babka <vbabka@suse.cz>



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

end of thread, other threads:[~2024-02-26  9:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-23 18:27 [PATCH v2 0/3] cleanup of SLAB_ flags Vlastimil Babka
2024-02-23 18:27 ` [PATCH v2 1/3] mm, slab: deprecate SLAB_MEM_SPREAD flag Vlastimil Babka
2024-02-24 21:00   ` David Rientjes
2024-02-23 18:27 ` [PATCH v2 2/3] mm, slab: use an enum to define SLAB_ cache creation flags Vlastimil Babka
2024-02-24 21:02   ` David Rientjes
2024-02-23 18:27 ` [PATCH v2 3/3] mm, slab, kasan: replace kasan_never_merge() with SLAB_NO_MERGE Vlastimil Babka
2024-02-24 21:02   ` David Rientjes
2024-02-26  9:11 ` [PATCH v2 0/3] cleanup of SLAB_ flags Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox