Skip to contentSkip to conversation

loongarch-mm-enable-mmu_gather_rcu_table_free.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Feb 6

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: LoongArch: mm: enable MMU_GATHER_RCU_TABLE_FREE
has been removed from the -mm tree. Its filename was
loongarch-mm-enable-mmu_gather_rcu_table_free.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: LoongArch: mm: enable MMU_GATHER_RCU_TABLE_FREE
Date: Tue, 27 Jan 2026 20:12:56 +0800

On a 64-bit system, madvise(MADV_DONTNEED) may cause a large number of empty PTE page table pages (such as 100GB+). To resolve this problem, first enable MMU_GATHER_RCU_TABLE_FREE to prepare for enabling the PT_RECLAIM feature, which resolves this problem.

Cc Huacai Chen <[email protected]>
Cc WANG Xuerui <[email protected]>
Cc Andreas Larsson <[email protected]>
Cc "Aneesh Kumar K.V" <[email protected]>
Cc Anton Ivanov <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Dave Hansen <[email protected]>
Cc David Hildenbrand (Red Hat) <[email protected]>
Cc Dev Jain <[email protected]>
Cc Helge Deller <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc Johannes Berg <[email protected]>
Cc Lance Yang <[email protected]>
Cc "Liam R. Howlett" <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Magnus Lindholm <[email protected]>
Cc Matt Turner <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Richard Henderson <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Wei Yang <[email protected]>
Cc Will Deacon <[email protected]>

---

 arch/loongarch/Kconfig               |    1 +
 arch/loongarch/include/asm/pgalloc.h |    7 +++----
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/loongarch/include/asm/pgalloc.h renamed from arch/loongarch/include/asm/pgalloc.h~loongarch-mm-enable-mmu_gather_rcu_table_free +3 -4
@@ -55,8 +55,7 @@ static inline pte_t *pte_alloc_one_kerne
 	return pte;
 }
 
-#define __pte_free_tlb(tlb, pte, address)	\
-	tlb_remove_ptdesc((tlb), page_ptdesc(pte))
+#define __pte_free_tlb(tlb, pte, address)	tlb_remove_ptdesc((tlb), page_ptdesc(pte))
 
 #ifndef __PAGETABLE_PMD_FOLDED
 
@@ -79,7 +78,7 @@ static inline pmd_t *pmd_alloc_one(struc
 	return pmd;
 }
 
-#define __pmd_free_tlb(tlb, x, addr)	pmd_free((tlb)->mm, x)
+#define __pmd_free_tlb(tlb, x, addr)	tlb_remove_ptdesc((tlb), virt_to_ptdesc(x))
 
 #endif
 
@@ -99,7 +98,7 @@ static inline pud_t *pud_alloc_one(struc
 	return pud;
 }
 
-#define __pud_free_tlb(tlb, x, addr)	pud_free((tlb)->mm, x)
+#define __pud_free_tlb(tlb, x, addr)	tlb_remove_ptdesc((tlb), virt_to_ptdesc(x))
 
 #endif /* __PAGETABLE_PUD_FOLDED */
 
arch/loongarch/Kconfig renamed from arch/loongarch/Kconfig~loongarch-mm-enable-mmu_gather_rcu_table_free +1 -0
@@ -187,6 +187,7 @@ config LOONGARCH
 	select IRQ_LOONGARCH_CPU
 	select LOCK_MM_AND_FIND_VMA
 	select MMU_GATHER_MERGE_VMAS if MMU
+	select MMU_GATHER_RCU_TABLE_FREE
 	select MODULES_USE_ELF_RELA if MODULES
 	select NEED_PER_CPU_EMBED_FIRST_CHUNK
 	select NEED_PER_CPU_PAGE_FIRST_CHUNK

_

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