summaryrefslogtreecommitdiff
path: root/mm/Kconfig
diff options
context:
space:
mode:
authorSergey Senozhatsky <senozhatsky@chromium.org>2023-01-18 03:52:09 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-02-03 09:33:23 +0300
commit4ff93b292c0b91b9a7c9fb54643f122bbe59d8d0 (patch)
treea36d556a6791f114d710da25d592a71fa8f4ed03 /mm/Kconfig
parente1d1f3546913ae0af9da31df8183a6f3da0cd590 (diff)
downloadlinux-4ff93b292c0b91b9a7c9fb54643f122bbe59d8d0.tar.xz
zsmalloc: make zspage chain size configurable
Remove hard coded limit on the maximum number of physical pages per-zspage. This will allow tuning of zsmalloc pool as zspage chain size changes `pages per-zspage` and `objects per-zspage` characteristics of size classes which also affects size classes clustering (the way size classes are merged). Link: https://lkml.kernel.org/r/20230118005210.2814763-4-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Acked-by: Minchan Kim <minchan@kernel.org> Cc: Mike Kravetz <mike.kravetz@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/Kconfig')
-rw-r--r--mm/Kconfig19
1 files changed, 19 insertions, 0 deletions
diff --git a/mm/Kconfig b/mm/Kconfig
index 39df30dcabe3..83b1d278b31c 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -191,6 +191,25 @@ config ZSMALLOC_STAT
information to userspace via debugfs.
If unsure, say N.
+config ZSMALLOC_CHAIN_SIZE
+ int "Maximum number of physical pages per-zspage"
+ default 4
+ range 4 16
+ depends on ZSMALLOC
+ help
+ This option sets the upper limit on the number of physical pages
+ that a zmalloc page (zspage) can consist of. The optimal zspage
+ chain size is calculated for each size class during the
+ initialization of the pool.
+
+ Changing this option can alter the characteristics of size classes,
+ such as the number of pages per zspage and the number of objects
+ per zspage. This can also result in different configurations of
+ the pool, as zsmalloc merges size classes with similar
+ characteristics.
+
+ For more information, see zsmalloc documentation.
+
menu "SLAB allocator options"
choice