Skip to contentSkip to conversation

mm-thp-reparent-the-split-queue-during-memcg-offline.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: reparent the split queue during memcg offline
has been removed from the -mm tree. Its filename was
mm-thp-reparent-the-split-queue-during-memcg-offline.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: Qi Zheng <[email protected]>
Subject: mm: thp: reparent the split queue during memcg offline
Date: Mon, 10 Nov 2025 16:17:58 +0800

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). So let's apply the similar mechanism as list_lru to reparent the split queue separately when memcg is offine.

This is also a preparation for reparenting LRU folios.

---

 include/linux/huge_mm.h    |    4 +++
 include/linux/memcontrol.h |   11 ++++++++
 mm/huge_memory.c           |   44 +++++++++++++++++++++++++++++++++++
 mm/memcontrol.c            |    1 
 4 files changed, 60 insertions(+)
include/linux/huge_mm.h renamed from include/linux/huge_mm.h~mm-thp-reparent-the-split-queue-during-memcg-offline +4 -0
@@ -415,6 +415,9 @@ static inline int split_huge_page(struct
 	return split_huge_page_to_list_to_order(page, NULL, 0);
 }
 void deferred_split_folio(struct folio *folio, bool partially_mapped);
+#ifdef CONFIG_MEMCG
+void reparent_deferred_split_queue(struct mem_cgroup *memcg);
+#endif
 
 void __split_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
 		unsigned long address, bool freeze);
@@ -647,6 +650,7 @@ static inline int try_folio_split_to_ord
 }
 
 static inline void deferred_split_folio(struct folio *folio, bool partially_mapped) {}
+static inline void reparent_deferred_split_queue(struct mem_cgroup *memcg) {}
 #define split_huge_pmd(__vma, __pmd, __address)	\
 	do { } while (0)
 
include/linux/memcontrol.h renamed from include/linux/memcontrol.h~mm-thp-reparent-the-split-queue-during-memcg-offline +11 -0
@@ -1775,6 +1775,12 @@ static inline void count_objcg_events(st
 bool mem_cgroup_node_allowed(struct mem_cgroup *memcg, int nid);
 
 void mem_cgroup_show_protected_memory(struct mem_cgroup *memcg);
+
+static inline bool memcg_is_dying(struct mem_cgroup *memcg)
+{
+	return memcg ? css_is_dying(&memcg->css) : false;
+}
+
 #else
 static inline bool mem_cgroup_kmem_disabled(void)
 {
@@ -1845,6 +1851,11 @@ static inline bool mem_cgroup_node_allow
 static inline void mem_cgroup_show_protected_memory(struct mem_cgroup *memcg)
 {
 }
+
+static inline bool memcg_is_dying(struct mem_cgroup *memcg)
+{
+	return false;
+}
 #endif /* CONFIG_MEMCG */
 
 #if defined(CONFIG_MEMCG) && defined(CONFIG_ZSWAP)
mm/huge_memory.c renamed from mm/huge_memory.c~mm-thp-reparent-the-split-queue-during-memcg-offline +44 -0

66 lines not on this page · raw message

mm/memcontrol.c renamed from mm/memcontrol.c~mm-thp-reparent-the-split-queue-during-memcg-offline +1 -0
@@ -3920,6 +3920,7 @@ static void mem_cgroup_css_offline(struc
 	zswap_memcg_offline_cleanup(memcg);
 
 	memcg_offline_kmem(memcg);
+	reparent_deferred_split_queue(memcg);
 	reparent_shrinker_deferred(memcg);
 	wb_memcg_offline(memcg);
 	lru_gen_offline_memcg(memcg);

_

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