[RFC PATCH 2/4] mm: mglru: do try_to_inc_min_seq if scanned==0
From: Barry Song (Xiaomi)
Date: Sat Jul 25 2026 - 21:31:01 EST
If scanned == 0, we are likely running out of folios in the
reclaimable gens. Advance min_seq to keep it in sync with the
current reclaimable state.
Signed-off-by: Barry Song (Xiaomi) <baohua@xxxxxxxxxx>
---
mm/vmscan.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index f79402760776..4f3a375de86e 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4858,6 +4858,7 @@ static int isolate_folios(unsigned long nr_to_scan, struct lruvec *lruvec,
* Only fall back when reclaim is running at high priority.
*/
if (!scanned) {
+ try_to_inc_min_seq(lruvec, swappiness);
if (!sc->priority)
type = !type;
}
--
2.39.3 (Apple Git-146)