Skip to content

mm: zswap: global shrinker fix and proactive shrink

Takero Funaki linux-doc linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mm: zswap: fix global shrinker memcg iterationmm/zswap.c+56 -202 replies
2/3mm: zswap: fix global shrinker error handling logicmm/zswap.c+26 -52 replies
3/3mm: zswap: proactive shrinking before pool size limit is hitDocumentation/admin-guide/mm/zswap.rst mm/zswap.c+37 -292 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] mm: zswap: global shrinker fix and proactive shrink

Hello,

This series addresses two issues and introduces a minor improvement in the zswap global shrinker:

1. Fix the memcg iteration logic that breaks iteration on offline memcgs.
2. Fix the error path that aborts on expected error codes.
3. Add proactive shrinking at 95% full, for 90% accept threshold.

These patches need to be applied in this order to avoid potential loops caused by the first issue. Patch 3 can be applied independently, but the two issues must be resolved to ensure the shrinker can evict pages.

With this series applied, the shrinker will continue to evict pages until accept_threshold_percent proactively as documented in patch 3. As a side effect of changes in the hysteresis logic, zswap will no longer reject pages under the max pool limit.

Regards,
Takero Funaki <[email protected]>

Takero Funaki (3):
mm: zswap: fix global shrinker memcg iteration
mm: zswap: fix global shrinker error handling logic
mm: zswap: proactive shrinking before pool size limit is hit

 Documentation/admin-guide/mm/zswap.rst |  17 ++-
 mm/zswap.c                             | 156 ++++++++++++++++++-------
 2 files changed, 119 insertions(+), 54 deletions(-)
Signature · 1 line
2.43.0