Skip to contentSkip to conversation

mm-pgtable-completely-move-pagetable_dtor-to-generic-tlb_remove_table.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jan 14, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: pgtable: completely move pagetable_dtor() to generic tlb_remove_table()
has been removed from the -mm tree. Its filename was
mm-pgtable-completely-move-pagetable_dtor-to-generic-tlb_remove_table.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: pgtable: completely move pagetable_dtor() to generic tlb_remove_table()
Date: Wed, 8 Jan 2025 14:57:31 +0800

For the generic tlb_remove_table(), it is implemented in the following two forms:

1) CONFIG_MMU_GATHER_TABLE_FREE is enabled

tlb_remove_table
--> generic __tlb_remove_table()

2) CONFIG_MMU_GATHER_TABLE_FREE is disabled

tlb_remove_table
--> tlb_remove_page

For case 1), the pagetable_dtor() has already been moved to generic __tlb_remove_table().

For case 2), now only arm will call tlb_remove_table()/tlb_remove_ptdesc() when CONFIG_MMU_GATHER_TABLE_FREE is disabled. Let's move pagetable_dtor() completely to generic tlb_remove_table(), so that the architectures can follow more easily.

Cc Alexander Gordeev <[email protected]>
Cc Alexandre Ghiti <[email protected]>
Cc Alexandre Ghiti <[email protected]>
Cc Andreas Larsson <[email protected]>
Cc Aneesh Kumar K.V (Arm) <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Dave Hansen <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc David Rientjes <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Jann Horn <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Matthew Wilcox (Oracle) <[email protected]>
Cc Mike Rapoport (Microsoft) <[email protected]>
Cc Muchun Song <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Palmer Dabbelt <[email protected]>
Cc Peter Zijlstra (Intel) <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vishal Moola (Oracle) <[email protected]>
Cc Will Deacon <[email protected]>
Cc Yu Zhao <[email protected]>

---

 arch/arm/include/asm/tlb.h |    4 ----
 include/asm-generic/tlb.h  |   10 ++++++++--
 2 files changed, 8 insertions(+), 6 deletions(-)
arch/arm/include/asm/tlb.h renamed from arch/arm/include/asm/tlb.h~mm-pgtable-completely-move-pagetable_dtor-to-generic-tlb_remove_table +0 -4
@@ -34,10 +34,6 @@ __pte_free_tlb(struct mmu_gather *tlb, p
 {
 	struct ptdesc *ptdesc = page_ptdesc(pte);
 
-#ifndef CONFIG_MMU_GATHER_TABLE_FREE
-	pagetable_dtor(ptdesc);
-#endif
-
 #ifndef CONFIG_ARM_LPAE
 	/*
 	 * With the classic ARM MMU, a pte page has two corresponding pmd
include/asm-generic/tlb.h renamed from include/asm-generic/tlb.h~mm-pgtable-completely-move-pagetable_dtor-to-generic-tlb_remove_table +8 -2
@@ -220,14 +220,20 @@ static inline void __tlb_remove_table(vo
 
 extern void tlb_remove_table(struct mmu_gather *tlb, void *table);
 
-#else /* !CONFIG_MMU_GATHER_HAVE_TABLE_FREE */
+#else /* !CONFIG_MMU_GATHER_TABLE_FREE */
 
+static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page);
 /*
  * Without MMU_GATHER_TABLE_FREE the architecture is assumed to have page based
  * page directories and we can use the normal page batching to free them.
  */
-#define tlb_remove_table(tlb, page) tlb_remove_page((tlb), (page))
+static inline void tlb_remove_table(struct mmu_gather *tlb, void *table)
+{
+	struct page *page = (struct page *)table;
 
+	pagetable_dtor(page_ptdesc(page));
+	tlb_remove_page(tlb, page);
+}
 #endif /* CONFIG_MMU_GATHER_TABLE_FREE */
 
 #ifdef CONFIG_MMU_GATHER_RCU_TABLE_FREE

_

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