v1 2026-10-23

SLUB_TINY改为启动参数 · v1

将 CONFIG_SLUB_TINY 改为启动参数控制的变量并弃用配置项,使 kdump 内核可运行时关闭 percpu 缓存。

原始补丁链接

子 Patch(8)

1/8
mm, slab: refactor slab_min/max_order handling
将 slab_min/max_order 启动参数改为 initdata 暂存,在 kmem_cache_init() 统一解析,解决原有回调顺序依赖、min 未校验 MAX_PAGE_ORDER 且能抬高 max 的问题,并重命名内部 slub* 为 slab*。
2/8
mm, slab: introduce slab_debug=N
新增 slab_debug=N 空操作调试级别,仅强制调试慢路径并把 sheaf 容量置零,以关闭 percpu 缓存节省内存,避免真实调试开销,也为 CONFIG_SLUB_TINY 启动化铺路。
3/8
mm, slab: rework KMALLOC_RECLAIM handling of SLUB_TINY
One (relatively minor) aspect of CONFIG_SLUB_TINY is the assumption that letting reclaimable and non-reclaimable caches merge will save more memory, which is more important on small systems than the p
4/8
mm, slab: make SLUB_TINY handling dynamic for sizing decisions
Enabling CONFIG_SLUB_TINY results in the caches’ min partial slabs threshold to be zero, thus every slab where all objects become free is freed immediately. It also sets the default slab_max_order to
5/8
mm, slab: convert CONFIG_SLUB_TINY checks to kmem_cache_debug()
CONFIG_SLUB_TINY shares several slowpaths with debugging as both of them avoid percpu caching of objects. With the goal of replacing the config with a boot-time decision, extend this sharing by hookin
6/8
mm, slab: remove remaining compile-time checks for CONFIG_SLUB_TINY
Remove several minor aspect of CONFIG_SLUB_TINY to allow it to be fully a boot-time decision: - remove check in cache_has_sheaves(), with no change to functionality but only on code elimination -
7/8
mm, slab: add slab_tiny boot param
In order to deprecate the CONFIG_SLUB_TINY option, introduce an early boot param slab_tiny to control the value of slab_tiny_enabled. As long as CONFIG_SLUB_TINY is still around and enabled, this boo
8/8
mm, slab: deprecate CONFIG_SLUB_TINY and reduce its Kconfig effects
At this point CONFIG_SLUB_TINY only affects the default value of slab_tiny_enabled which has a boot-time parameter. Thus deprecate it in the Kconfig description. Also remove its interactions with oth