RFC mm: zsmalloc: make shrinker compaction budget-aware
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 37 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mm: zsmalloc: add a page limit to pool compactionmm/ | +17 | 0 replies | |
| 2/2 | mm: zsmalloc: use the shrinker reclaim budgetmm/ | +18 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/2] mm: zsmalloc: make shrinker compaction budget-aware
From: Xueyuan Chen <[email protected]>
zs_shrinker_scan() currently calls zs_compact(), which compacts the whole pool regardless of sc->nr_to_scan. A single shrinker callback can therefore reclaim much more than requested and spend a long time in compaction.
On an Android device with 12 GB of RAM, observed zsmalloc compaction durations had a p95 of 38.86 ms and a maximum of 269.68 ms, motivating a per-scan reclaim goal.
This series uses sc->nr_to_scan as a reclaimed-page goal and keeps a per-pool size-class cursor so later scans resume where the previous scan stopped. The existing full-pool behavior of zs_compact() is unchanged.
Xueyuan Chen (2):
mm: zsmalloc: add a page limit to pool compaction
mm: zsmalloc: use the shrinker reclaim budget
mm/zsmalloc.c | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-)
--
2.47.3