All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/vmscan: reclaim every zone in per-node proactive reclaim
@ 2026-10-19 18:50 Gregory Price (Meta)
  2026-10-19 20:14 ` Barry Song
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Gregory Price (Meta) @ 2026-10-19 18:50 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, kernel-team, akpm, kasong, qi.zheng, shakeel.butt,
	baohua, axelrasmussen, yuanchu, weixugc, baoquan.he, baolin.wang,
	hannes, david, mhocko, ljs, dave, roman.gushchin, stable

user_proactive_reclaim() limits per-node reclaim to
gfp_zone(GFP_KERNEL), which is ZONE_NORMAL. Proactive reclaim serves no
allocation, but that limit makes shrink_node() skip every ZONE_MOVABLE
folio, so writing to /sys/devices/system/node/nodeN/reclaim never
reclaims a node's movable memory. A movable-only node, such as dax/kmem
or hotplugged memory onlined movable, reclaims nothing and fails with
-EAGAIN.

To reproduce, fill a movable-only node with clean page cache and write
200M to its nodeN/reclaim: the write fails with -EAGAIN and the page
cache stays. The same write to a ZONE_NORMAL node frees 200MB.

Scan every zone, as memory.reclaim does.

Fixes: b980077899ea4 ("mm: introduce per-node proactive reclaim interface")
Cc: stable@vger.kernel.org
Signed-off-by: Gregory Price (Meta) <gourry@gourry.net>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index e82ba737c028d..90f7a7bf4e426 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -8180,7 +8180,7 @@ int user_proactive_reclaim(char *buf,
 		} else {
 			struct scan_control sc = {
 				.gfp_mask = current_gfp_context(gfp_mask),
-				.reclaim_idx = gfp_zone(gfp_mask),
+				.reclaim_idx = MAX_NR_ZONES - 1,
 				.proactive_swappiness = swappiness == -1 ? NULL : &swappiness,
 				.priority = DEF_PRIORITY,
 				.may_writepage = 1,
-- 
2.53.0-Meta



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-10-20 16:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 18:50 [PATCH] mm/vmscan: reclaim every zone in per-node proactive reclaim Gregory Price (Meta)
2026-10-19 20:14 ` Barry Song
2026-10-19 20:16 ` Johannes Weiner
2026-10-19 20:51 ` Harry Yoo
2026-10-19 22:06 ` Shakeel Butt
2026-10-19 22:52 ` Yosry Ahmed
2026-10-20  0:36 ` SJ Park
2026-10-20  1:49 ` Balbir Singh
2026-10-20  3:04   ` Gregory Price
2026-10-20  7:49 ` Michal Hocko
2026-10-20 15:19 ` Kunwu Chan
2026-10-20 16:59 ` Davidlohr Bueso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.