Re: [PATCH -v4 1/4] mm/vmscan: fix anon-only reclaim evicting file pages when swappiness=max

From: Michal Hocko

Date: Tue Jul 28 2026 - 07:57:03 EST


On Tue 28-07-26 18:03:24, Barry Song wrote:
[...]
> I understand your point. I just find
>
> if (swappiness == SWAPPINESS_ANON_ONLY && sc->proactive)
>
> a bit odd, since `swappiness == SWAPPINESS_ANON_ONLY`
> already implies `sc->proactive`.

It does so very implicitely and you need to look around to learn about
that. That is my biggest concen here. WARN on is just a very poor
annotation to remind us about that assumption.

I would much rather have get_scan_count more self explanatory as it is
quite heavy already.

--
Michal Hocko
SUSE Labs