Skip to contentSkip to conversation

mm-thp-clear-deferred-split-shrinker-bits-when-queues-drain.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jun 9

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/thp: clear deferred split shrinker bits when queues drain
has been removed from the -mm tree. Its filename was
mm-thp-clear-deferred-split-shrinker-bits-when-queues-drain.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: Lance Yang <[email protected]>
Subject: mm/thp: clear deferred split shrinker bits when queues drain
Date: Tue, 2 Jun 2026 12:34:53 +0800

deferred_split_count() returns the raw list_lru count. When the per-memcg, per-node list is empty, that count is 0.

That skips scanning, but it does not tell memcg reclaim that the shrinker is empty. shrink_slab_memcg() only clears the memcg shrinker bit when the count callback reports SHRINK_EMPTY.

Return SHRINK_EMPTY for an empty deferred split list, so the bit can be cleared once the queue has drained.

Cc Baolin Wang <[email protected]>
Cc Barry Song <[email protected]>
Cc Dave Chinner <[email protected]>
Cc Dev Jain <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Kairui Song <[email protected]>
Cc Kefeng Wang <[email protected]>
Cc Liam R. Howlett <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Mikhail Zaslonko <[email protected]>
Cc Muchun Song <[email protected]>
Cc Nico Pache <[email protected]>
Cc Roman Gushchin <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc Shakeel Butt <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Zi Yan <[email protected]>

---

 mm/huge_memory.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
mm/huge_memory.c renamed from mm/huge_memory.c~mm-thp-clear-deferred-split-shrinker-bits-when-queues-drain +4 -1
@@ -4410,7 +4410,10 @@ void deferred_split_folio(struct folio *
 static unsigned long deferred_split_count(struct shrinker *shrink,
 		struct shrink_control *sc)
 {
-	return list_lru_shrink_count(&deferred_split_lru, sc);
+	unsigned long count;
+
+	count = list_lru_shrink_count(&deferred_split_lru, sc);
+	return count ?: SHRINK_EMPTY;
 }
 
 static bool thp_underused(struct folio *folio)

_

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