Skip to contentSkip to conversation

mm-thp-replace-folio_memcg-with-folio_memcg_charged.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Nov 24, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: thp: replace folio_memcg() with folio_memcg_charged()
has been removed from the -mm tree. Its filename was
mm-thp-replace-folio_memcg-with-folio_memcg_charged.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: Muchun Song <[email protected]>
Subject: mm: thp: replace folio_memcg() with folio_memcg_charged()
Date: Mon, 10 Nov 2025 16:17:55 +0800

Patch series "reparent the THP split queue", v6.

In the future, we will reparent LRU folios during memcg offline to eliminate dying memory cgroups, which requires reparenting the THP split queue to its parent memcg.

Similar to list_lru, the split queue is relatively independent and does not need to be reparented along with objcg and LRU folios (holding objcg lock and lru lock). Therefore, we can apply the same mechanism as list_lru to reparent the split queue first when memcg is offine.

The first three patches in this series are separated from the series "Eliminate Dying Memory Cgroup" [1], mainly to do some cleanup and preparatory work.

The last patch reparents the THP split queue to its parent memcg during memcg offline.

This patch (of 4):

folio_memcg_charged() is intended for use when the user is unconcerned about the returned memcg pointer. It is more efficient than folio_memcg(). Therefore, replace folio_memcg() with folio_memcg_charged().

---

 mm/huge_memory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/huge_memory.c renamed from mm/huge_memory.c~mm-thp-replace-folio_memcg-with-folio_memcg_charged +1 -1
@@ -4127,7 +4127,7 @@ bool __folio_unqueue_deferred_split(stru
 	bool unqueued = false;
 
 	WARN_ON_ONCE(folio_ref_count(folio));
-	WARN_ON_ONCE(!mem_cgroup_disabled() && !folio_memcg(folio));
+	WARN_ON_ONCE(!mem_cgroup_disabled() && !folio_memcg_charged(folio));
 
 	ds_queue = get_deferred_split_queue(folio);
 	spin_lock_irqsave(&ds_queue->split_queue_lock, flags);

_

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