Skip to contentSkip to conversation

mm: Make SLAB_MERGE_DEFAULT depend on SL[AU]B

PATCH In review Hyeonggon Yoo 2 participants 2 messages Dec 25, 2021 – Jan 5, 2022 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: Make SLAB_MERGE_DEFAULT depend on SL[AU]B

SLOB always manage objects of different caches in same page regardless of SLAB_MERGE_DEFAULT. Because it has no effect on SLOB, make it depend on SLAB || SLUB.

---
 init/Kconfig | 1 +
 1 file changed, 1 insertion(+)
init/Kconfig +1 -0
index 4b7bac10c72d..03e1b863f5ce 100644
@@ -1933,6 +1933,7 @@ endchoice
 config SLAB_MERGE_DEFAULT
 	bool "Allow slab caches to be merged"
 	default y
+	depends on SLAB || SLUB
 	help
 	  For reduced kernel memory fragmentation, slab caches can be
 	  merged when they share the same size and other characteristics.
Signature · 1 line
2.33.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Hyeonggon Yoo

SLOB always manage objects of different caches in same page regardless of SLAB_MERGE_DEFAULT. Because it has no effect on SLOB, make it depend on SLAB || SLUB.

I will take this to the slab tree, thanks!

Quoted 16 lines
---
 init/Kconfig | 1 +
 1 file changed, 1 insertion(+)
init/Kconfig +1 -0
index 4b7bac10c72d..03e1b863f5ce 100644
@@ -1933,6 +1933,7 @@ endchoice
 config SLAB_MERGE_DEFAULT
 	bool "Allow slab caches to be merged"
 	default y
+	depends on SLAB || SLUB
 	help
 	  For reduced kernel memory fragmentation, slab caches can be
 	  merged when they share the same size and other characteristics.