Re: [PATCH v4 RESEND 0/5] mm: restore per-memcg reclaim for NONSLAB shrinkers under nokmem

From: Andrew Morton

Date: Tue Nov 10 2026 - 00:55:14 EST


On Thu, 5 Nov 2026 17:22:28 +0800 Qinyun Tan <qinyuntan@xxxxxxxxxxxxxxxxx> wrote:

> With cgroup.memory=nokmem, the THP deferred split shrinker and the
> zswap shrinker are degraded in two ways.
>
> First, both shrinkers are missing the SHRINKER_NONSLAB flag, so
> shrinker_memcg_alloc() demotes them to non-memcg-aware shrinkers:
> limit-induced reclaim of a cgroup neither splits its partially
> unmapped THPs nor writes back its zswapped pages. v1 of this series
> [1] restored the flag to fix that.
>
> However, as Sashiko's review of v1 pointed out [2], the flag alone
> is not enough. __list_lru_init() also collapses every list_lru into
> per-node lists under nokmem, so even with the flag restored, the
> objects of all cgroups share one list per node: the per-memcg
> shrinker bit is only set for whichever memcg happens to repopulate
> the empty list, so pressure in other cgroups may not even trigger
> the scan, and when it does, the scan walks everyone's objects.

Thanks. Sashiko still has significant-sounding things to say:

https://sashiko.dev/#/patchset/20261105092233.3558950-1-qinyuntan@xxxxxxxxxxxxxxxxx

It also says "failed" for reasons I don't understand and it doesn't
seem to have emailed anyone. Please check it out?