All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-mglru-make-retry-logic-explicit-in-isolate_folios.patch removed from -mm tree
@ 2026-10-07  0:50 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-10-07  0:50 UTC (permalink / raw)
  To: mm-commits, yuanchu, weixugc, stevensd, shakeel.butt, mhocko, ljs,
	kasong, hannes, david, chenridong, baoquan.he, baolin.wang,
	axelrasmussen, baohua, akpm


The quilt patch titled
     Subject: mm/mglru: make retry logic explicit in isolate_folios()
has been removed from the -mm tree.  Its filename was
     mm-mglru-make-retry-logic-explicit-in-isolate_folios.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Barry Song (Xiaomi)" <baohua@kernel.org>
Subject: mm/mglru: make retry logic explicit in isolate_folios()
Date: Sat, 29 Aug 2026 15:42:04 +0800

The existing mainline code retries the same type once in a rather subtle
way.  `for_each_evictable_type()` may provide one more iteration, allowing
the same type to be retried if we scanned some folios but failed to
isolate any due to protections, promotions, or races.  This patch makes
the retry behavior explicit.

Link: https://lore.kernel.org/20260829074204.45304-3-baohua@kernel.org
Signed-off-by: Barry Song (Xiaomi) <baohua@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Baoquan He <baoquan.he@linux.dev>
Cc: David Hildenbrand <david@kernel.org>
Cc: David Stevens <stevensd@chromium.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kairui Song <kasong@tencent.com>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Ridong Chen <chenridong@xiaomi.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Wei Xu <weixugc@google.com>
Cc: Yuanchu Xie <yuanchu@google.com>
---

 mm/vmscan.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- a/mm/vmscan.c~mm-mglru-make-retry-logic-explicit-in-isolate_folios
+++ a/mm/vmscan.c
@@ -4840,6 +4840,7 @@ static int isolate_folios(unsigned long
 	bool type_fallback_allowed = !is_single_type_reclaim(swappiness);
 	int type = get_type_to_scan(lruvec, swappiness);
 	int total_scanned = 0, scanned, tier;
+	bool tried = false;
 
 retry:
 	tier = get_tier_idx(lruvec, type);
@@ -4859,9 +4860,18 @@ retry:
 	 */
 	if (!scanned && type_fallback_allowed) {
 		type = !type;
+		tried = true;
 		type_fallback_allowed = false;
 		goto retry;
 	}
+	/*
+	 * We scanned some folios but failed to isolate any due to promotions,
+	 * protections, or races. Retry once to avoid a larger loop.
+	 */
+	if (scanned && !tried) {
+		tried = true;
+		goto retry;
+	}
 
 	return total_scanned;
 }
_

Patches currently in -mm which might be from baohua@kernel.org are

mm-mglru-restore-accidentally-removed-seq-max_seq-check.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-07  0:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07  0:50 [merged mm-stable] mm-mglru-make-retry-logic-explicit-in-isolate_folios.patch removed from -mm tree Andrew Morton

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.