Skip to contentSkip to conversation

mm-lru_add_drain_all-do-local-lru_add_drain-first.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 21, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: lru_add_drain_all() do local lru_add_drain() first
has been removed from the -mm tree. Its filename was
mm-lru_add_drain_all-do-local-lru_add_drain-first.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: Hugh Dickins <[email protected]>
Subject: mm: lru_add_drain_all() do local lru_add_drain() first
Date: Mon, 8 Sep 2025 15:24:54 -0700 (PDT)

No numbers to back this up, but it seemed obvious to me, that if there are competing lru_add_drain_all()ers, the work will be minimized if each flushes its own local queues before locking and doing cross-CPU drains.

Cc "Aneesh Kumar K.V" <[email protected]>
Cc Axel Rasmussen <[email protected]>
Cc Chris Li <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc John Hubbard <[email protected]>
Cc Keir Fraser <[email protected]>
Cc Konstantin Khlebnikov <[email protected]>
Cc Li Zhe <[email protected]>
Cc Matthew Wilcox (Oracle) <[email protected]>
Cc Peter Xu <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Shivank Garg <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Wei Xu <[email protected]>
Cc Will Deacon <[email protected]>
Cc yangge <[email protected]>
Cc Yuanchu Xie <[email protected]>
Cc Yu Zhao <[email protected]>

---

 mm/swap.c |    3 +++
 1 file changed, 3 insertions(+)
mm/swap.c renamed from mm/swap.c~mm-lru_add_drain_all-do-local-lru_add_drain-first +3 -0
@@ -834,6 +834,9 @@ static inline void __lru_add_drain_all(b
 	 */
 	this_gen = smp_load_acquire(&lru_drain_gen);
 
+	/* It helps everyone if we do our own local drain immediately. */
+	lru_add_drain();
+
 	mutex_lock(&lock);
 
 	/*

_

Patches currently in -mm which might be from [email protected] are