Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] mm: restore SHRINKER_NONSLAB on THP and zswap shrinkers
@ 2026-09-04  3:35 Qinyun Tan
  2026-09-04  3:35 ` [PATCH 1/2] mm: thp: restore SHRINKER_NONSLAB on the deferred split shrinker Qinyun Tan
  2026-09-04  3:35 ` [PATCH 2/2] mm: zswap: mark the zswap shrinker SHRINKER_NONSLAB Qinyun Tan
  0 siblings, 2 replies; 4+ messages in thread
From: Qinyun Tan @ 2026-09-04  3:35 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Koutný, David Hildenbrand, Lorenzo Stoakes, Zi Yan,
	Baolin Wang, Liam R . Howlett, Nico Pache, Ryan Roberts, Dev Jain,
	Barry Song, Lance Yang, Usama Arif, Johannes Weiner, Yosry Ahmed,
	Nhat Pham, Chengming Zhou, Kairui Song, Shakeel Butt, Xunlei Pang,
	linux-mm, linux-kernel, Qinyun Tan

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/697713c4-0857-485b-aba7-c74f37a3c8b4@linux.alibaba.com/

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(-)

-- 
2.43.7



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-04 15:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04  3:35 [PATCH 0/2] mm: restore SHRINKER_NONSLAB on THP and zswap shrinkers Qinyun Tan
2026-09-04  3:35 ` [PATCH 1/2] mm: thp: restore SHRINKER_NONSLAB on the deferred split shrinker Qinyun Tan
2026-09-04 15:17   ` Zi Yan
2026-09-04  3:35 ` [PATCH 2/2] mm: zswap: mark the zswap shrinker SHRINKER_NONSLAB Qinyun Tan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox