Skip to content

mm: restore SHRINKER_NONSLAB on THP and zswap shrinkers

Qinyun Tan linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mm: thp: restore SHRINKER_NONSLAB on the deferred split shrinkermm/huge_memory.c+2 -14 replies
2/2mm: zswap: mark the zswap shrinker SHRINKER_NONSLABmm/zswap.c+2 -22 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchZi YanBaolin WangDavid Hildenbrand (Arm)Usama ArifNhat Pham
1/2A-b R-b A-b A-b
2/2A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH 0/2] mm: restore SHRINKER_NONSLAB on THP and zswap shrinkers

While reviewing the patch "mm/list_lru: don't copy stale shrinker id from non-memcg-aware shrinkers" (now in mm-unstable), Michal noticed that the two non-slab memcg-aware shrinkers, the THP deferred split shrinker and the zswap shrinker, are registered without SHRINKER_NONSLAB [1].

Without that flag, booting with cgroup.memory=nokmem silently demotes both shrinkers to non-memcg-aware ones: memcg (limit-induced) reclaim neither splits partially unmapped THPs nor writes back zswapped pages of the cgroup under pressure.

Patch 1 restores the flag on the deferred split shrinker; it was lost when commit fafaeceb89a5 ("mm: switch deferred split shrinker to list_lru") re-registered the shrinker.

Patch 2 adds the flag to the zswap shrinker, which has never carried it since its introduction in commit b5ba474f3f51 ("zswap: shrink zswap pool based on memory pressure").

The series is based on mm-new, on top of the list_lru patch above, but the changes are independent of it.

[1] https://lore.kernel.org/lkml/[email protected]/

Qinyun Tan (2):
mm: thp: restore SHRINKER_NONSLAB on the deferred split shrinker
mm: zswap: mark the zswap shrinker SHRINKER_NONSLAB

 mm/huge_memory.c | 3 ++-
 mm/zswap.c       | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.7