linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: bail out from partial cgroup_reclaim inside shrink_lruvec
@ 2026-02-05  6:45 zhaoyang.huang
  2026-02-09  7:36 ` Zhaoyang Huang
  0 siblings, 1 reply; 2+ messages in thread
From: zhaoyang.huang @ 2026-02-05  6:45 UTC (permalink / raw)
  To: Andrew Morton, Yu Zhao, Michal Hocko, Rik van Riel, Shakeel Butt,
	Roman Gushchin, Johannes Weiner, linux-mm, linux-kernel,
	Zhaoyang Huang, steve.kang

From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>

Oversize reclaiming observed in "echo xxx > memory.reclaim". This commit
would like to sync the stop creteria in shrink_node_memcgs to
shrink_lruvec to have partial cgroup_reclaim bail out as early as it can
be.

Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
---
 mm/vmscan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 670fe9fae5ba..03bda1094621 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4832,8 +4832,8 @@ static bool should_abort_scan(struct lruvec *lruvec, struct scan_control *sc)
 	int i;
 	enum zone_watermarks mark;
 
-	/* don't abort memcg reclaim to ensure fairness */
-	if (!root_reclaim(sc))
+	/* don't abort full walk memcg reclaim to ensure fairness */
+	if (!root_reclaim(sc) && sc->memcg_full_walk)
 		return false;
 
 	if (sc->nr_reclaimed >= max(sc->nr_to_reclaim, compact_gap(sc->order)))
-- 
2.25.1



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

end of thread, other threads:[~2026-02-09  7:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-05  6:45 [PATCH] mm: bail out from partial cgroup_reclaim inside shrink_lruvec zhaoyang.huang
2026-02-09  7:36 ` Zhaoyang Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox