Re: [RFC PATCH v2] mm: vmscan: avoid anon scanning for GFP_NOIO with low swapcache in MGLRU
From: Baolin Wang
Date: Thu Oct 22 2026 - 21:36:32 EST
On 10/23/26 5:19 AM, Barry Song wrote:
On Thu, Oct 22, 2026 at 7:26 PM Baolin Wang
<baolin.wang@xxxxxxxxxxxxxxxxx> wrote:
[...]
}
if (should_run_aging(lruvec, max_seq, sc, swappiness)) {
- if (try_to_inc_max_seq(lruvec, max_seq,
swappiness, false))
This is quite tricky. If we pass swappiness=0, anon aging will be
skipped. Do we want that for GFP_NOIO cases? I mean, these are not
real cases where anon aging should be disabled.
No, we have real use cases where 'vm_swappiness' is set to 0, which
means the workload never reclaims anon folios. So in this case we don't
need to age anon folios.
My concern is that setting swappiness to 0 for GFP_NOIO also skips
anon aging, making it behave the same as a real swappiness=0.
It will not. We will force anon aging for GFP_NOIO case.
However, GFP_NOIO is only a temporary state, and subsequent
allocations may not use GFP_NOIO.