Skip to content

mm/vmscan: fix swappiness=max and clean up per-node proactive reclaim

Ridong linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 14 repliesIn review 3 of 4 applied

v3 -> v4 from the cover letter

- Patch 4: Update comments and commit message.
- Patch 4: Adopted Sashiko's suggestion to use WARN_ON_ONCE.

Patches in v1 3 of 4 applied

#Subject and filesSizeRepliesApplied
1/4mm/vmscan: fix anon-only reclaim evicting file pages when swappiness=maxmm/vmscan.c+17 -710 replies
2/4mm: vmscan: propagate real error code from per-node proactive reclaimmm/vmscan.c+1 -10 repliesApplied
3/4mm: vmscan: drop unused gfp_mask parameter from __node_reclaim()mm/vmscan.c+4 -50 repliesApplied
4/4mm/mglru: fix anon-only reclaim evicting file pages when swappiness=maxmm/vmscan.c+19 -13 repliesApplied

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchShakeel ButtJohannes WeinerMuchun SongQi ZhengBarry SongKairui SongBaolin Wang
1/4A-b A-b R-b R-b R-b
2/4A-b A-b R-b R-b R-b
3/4A-b A-b R-b R-b R-b
4/4R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.

Read the v1 thread

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

From: Ridong Chen <[email protected]>

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

Patch 4 fixes the same "swappiness=max" issue for MGLRU.

---
v3 -> v4:
- Patch 4: Update comments and commit message.
- Patch 4: Adopted Sashiko's suggestion to use WARN_ON_ONCE.

v2 -> v3:
- Update comments and commit message.

v1 -> v2:
- Collected review tags for patches 1-3
- Added patch 4 to fix the same issue in the MGLRU path.

Ridong Chen (4):
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/mglru: fix anon-only reclaim evicting file pages when
swappiness=max

 mm/vmscan.c | 55 +++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 41 insertions(+), 14 deletions(-)
Signature · 1 line
2.34.1