v1
2026-08-15
zsmalloc shrinker 压缩预算感知 · v1
让 zsmalloc shrinker 按 nr_to_scan 预算压缩,用 size-class 游标续扫,避免整池压缩耗时过长。
原始补丁链接
子 Patch(2)
1/2
mm: zsmalloc: add a page limit to pool compaction
为 zs_compact() 添加目标页数参数,使其可提前停止,为受限调用方提供预算控制;不改变默认行为。
2/2
mm: zsmalloc: use the shrinker reclaim budget
zsmalloc shrinker 使用 shrinker 请求的页数作为压缩目标,避免每次 scan 压缩整个 pool;记录上次位置继续,减少过度回收。