[PATCH 0/3] mm/vmscan: fix swappiness=max and clean up per-node proactive reclaim

Ridong posted 3 patches 1 week ago
There is a newer version of this series
mm/vmscan.c | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
[PATCH 0/3] mm/vmscan: fix swappiness=max and clean up per-node proactive reclaim
Posted by Ridong 1 week ago
From: Ridong Chen <chenridong@xiaomi.com>

Two fixes and one cleanup.

Patch 1 fixes "swappiness=max": the anon-only test in get_scan_count()
sat after the "cannot reclaim anon" check, so when no anon was
reclaimable the request fell back to SCAN_FILE and evicted page cache
instead.

Patch 2 fixes reclaim_store() collapsing every error into -EAGAIN, so
callers can no longer tell an invalid argument from a busy interface;
propagate the real error code, matching the memcg path.

Patch 3 drops the now-unused gfp_mask parameter from __node_reclaim().

Ridong Chen (3):
  mm/vmscan: fix anon-only reclaim evicting file pages when
    swappiness=max
  mm: vmscan: propagate real error code from per-node proactive reclaim
  mm: vmscan: drop unused gfp_mask parameter from __node_reclaim()

 mm/vmscan.c | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

-- 
2.34.1
Re: [PATCH 0/3] mm/vmscan: fix swappiness=max and clean up per-node proactive reclaim
Posted by Andrew Morton 1 week ago
On Fri, 17 Jul 2026 19:32:57 +0800 Ridong <ridong.chen@linux.dev> wrote:

> From: Ridong Chen <chenridong@xiaomi.com>
> 
> Two fixes and one cleanup.
> 
> Patch 1 fixes "swappiness=max": the anon-only test in get_scan_count()
> sat after the "cannot reclaim anon" check, so when no anon was
> reclaimable the request fell back to SCAN_FILE and evicted page cache
> instead.
> 
> Patch 2 fixes reclaim_store() collapsing every error into -EAGAIN, so
> callers can no longer tell an invalid argument from a busy interface;
> propagate the real error code, matching the memcg path.
> 
> Patch 3 drops the now-unused gfp_mask parameter from __node_reclaim().

Thanks.  Sashiko want to know whether MGLRU should also be fixed:
	https://sashiko.dev/#/patchset/20260717113300.214717-1-ridong.chen@linux.dev
Re: [PATCH 0/3] mm/vmscan: fix swappiness=max and clean up per-node proactive reclaim
Posted by Ridong Chen 6 days, 19 hours ago

On 7/18/2026 3:53 AM, Andrew Morton wrote:
> On Fri, 17 Jul 2026 19:32:57 +0800 Ridong <ridong.chen@linux.dev> wrote:
> 
>> From: Ridong Chen <chenridong@xiaomi.com>
>>
>> Two fixes and one cleanup.
>>
>> Patch 1 fixes "swappiness=max": the anon-only test in get_scan_count()
>> sat after the "cannot reclaim anon" check, so when no anon was
>> reclaimable the request fell back to SCAN_FILE and evicted page cache
>> instead.
>>
>> Patch 2 fixes reclaim_store() collapsing every error into -EAGAIN, so
>> callers can no longer tell an invalid argument from a busy interface;
>> propagate the real error code, matching the memcg path.
>>
>> Patch 3 drops the now-unused gfp_mask parameter from __node_reclaim().
> 
> Thanks.  Sashiko want to know whether MGLRU should also be fixed:
> 	https://sashiko.dev/#/patchset/20260717113300.214717-1-ridong.chen@linux.dev
> 

Yes, it should be fixed. I will add a patch to fix it.

-- 
Best regards,
Ridong