+ mm-remove-pgtable_pmd-pte_page_ctor-dtor-wrappers.patch added to mm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm: remove pgtable_{pmd, pte}_page_{ctor, dtor}() wrappers
has been added to the -mm mm-unstable branch.  Its filename is
     mm-remove-pgtable_pmd-pte_page_ctor-dtor-wrappers.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-remove-pgtable_pmd-pte_page_ctor-dtor-wrappers.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: "Vishal Moola (Oracle)" <vishal.moola@xxxxxxxxx>
Subject: mm: remove pgtable_{pmd, pte}_page_{ctor, dtor}() wrappers
Date: Mon, 31 Jul 2023 10:03:32 -0700

These functions are no longer necessary.  Remove them and cleanup
Documentation referencing them.

Link: https://lkml.kernel.org/r/20230731170332.69404-32-vishal.moola@xxxxxxxxx
Signed-off-by: Vishal Moola (Oracle) <vishal.moola@xxxxxxxxx>
Acked-by: Mike Rapoport (IBM) <rppt@xxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Cc: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Cc: David Hildenbrand <david@xxxxxxxxxx>
Cc: David S. Miller <davem@xxxxxxxxxxxxx>
Cc: Dinh Nguyen <dinguyen@xxxxxxxxxx>
Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Cc: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
Cc: Guo Ren <guoren@xxxxxxxxxx>
Cc: Huacai Chen <chenhuacai@xxxxxxxxxx>
Cc: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: John Paul Adrian Glaubitz <glaubitz@xxxxxxxxxxxxxxxxxxx>
Cc: Jonas Bonn <jonas@xxxxxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Cc: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
Cc: Paul Walmsley <paul.walmsley@xxxxxxxxxx>
Cc: Richard Weinberger <richard@xxxxxx>
Cc: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
Cc: Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 Documentation/mm/split_page_table_lock.rst                    |   12 +++---
 Documentation/translations/zh_CN/mm/split_page_table_lock.rst |   14 +++----
 include/linux/mm.h                                            |   20 ----------
 3 files changed, 13 insertions(+), 33 deletions(-)

--- a/Documentation/mm/split_page_table_lock.rst~mm-remove-pgtable_pmd-pte_page_ctor-dtor-wrappers
+++ a/Documentation/mm/split_page_table_lock.rst
@@ -58,7 +58,7 @@ Support of split page table lock by an a
 ===================================================
 
 There's no need in special enabling of PTE split page table lock: everything
-required is done by pgtable_pte_page_ctor() and pgtable_pte_page_dtor(), which
+required is done by pagetable_pte_ctor() and pagetable_pte_dtor(), which
 must be called on PTE table allocation / freeing.
 
 Make sure the architecture doesn't use slab allocator for page table
@@ -68,8 +68,8 @@ This field shares storage with page->ptl
 PMD split lock only makes sense if you have more than two page table
 levels.
 
-PMD split lock enabling requires pgtable_pmd_page_ctor() call on PMD table
-allocation and pgtable_pmd_page_dtor() on freeing.
+PMD split lock enabling requires pagetable_pmd_ctor() call on PMD table
+allocation and pagetable_pmd_dtor() on freeing.
 
 Allocation usually happens in pmd_alloc_one(), freeing in pmd_free() and
 pmd_free_tlb(), but make sure you cover all PMD table allocation / freeing
@@ -77,7 +77,7 @@ paths: i.e X86_PAE preallocate few PMDs
 
 With everything in place you can set CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK.
 
-NOTE: pgtable_pte_page_ctor() and pgtable_pmd_page_ctor() can fail -- it must
+NOTE: pagetable_pte_ctor() and pagetable_pmd_ctor() can fail -- it must
 be handled properly.
 
 page->ptl
@@ -97,7 +97,7 @@ trick:
    split lock with enabled DEBUG_SPINLOCK or DEBUG_LOCK_ALLOC, but costs
    one more cache line for indirect access;
 
-The spinlock_t allocated in pgtable_pte_page_ctor() for PTE table and in
-pgtable_pmd_page_ctor() for PMD table.
+The spinlock_t allocated in pagetable_pte_ctor() for PTE table and in
+pagetable_pmd_ctor() for PMD table.
 
 Please, never access page->ptl directly -- use appropriate helper.
--- a/Documentation/translations/zh_CN/mm/split_page_table_lock.rst~mm-remove-pgtable_pmd-pte_page_ctor-dtor-wrappers
+++ a/Documentation/translations/zh_CN/mm/split_page_table_lock.rst
@@ -56,16 +56,16 @@ Hugetlbç?¹å®?ç??è¾?å?©å?½æ?°:
 æ?¶æ??对å??页表é??ç??æ?¯æ??
 ====================
 
-没æ??å¿?è¦?ç?¹å?«å?¯ç?¨PTEå??页表é??ï¼?æ??æ??é??è¦?ç??ä¸?西é?½ç?±pgtable_pte_page_ctor()
-å??pgtable_pte_page_dtor()å®?æ??ï¼?å®?们å¿?é¡»å?¨PTE表å??é??/é??æ?¾æ?¶è¢«è°?ç?¨ã??
+没æ??å¿?è¦?ç?¹å?«å?¯ç?¨PTEå??页表é??ï¼?æ??æ??é??è¦?ç??ä¸?西é?½ç?±pagetable_pte_ctor()
+å??pagetable_pte_dtor()å®?æ??ï¼?å®?们å¿?é¡»å?¨PTE表å??é??/é??æ?¾æ?¶è¢«è°?ç?¨ã??
 
 ç¡®ä¿?æ?¶æ??ä¸?使ç?¨slabå??é??å?¨æ?¥å??é??页表ï¼?slab使ç?¨page->slab_cacheæ?¥å??é??å?¶é¡µ
 é?¢ã??è¿?个å?ºå??ä¸?page->ptlå?±äº«å­?å?¨ã??
 
 PMDå??页é??å?ªæ??å?¨ä½ æ??两个以ä¸?ç??页表级å?«æ?¶æ??æ??æ??ä¹?ã??
 
-å?¯ç?¨PMDå??页é??é??è¦?å?¨PMD表å??é??æ?¶è°?ç?¨pgtable_pmd_page_ctor()ï¼?å?¨é??æ?¾æ?¶è°?
-ç?¨pgtable_pmd_page_dtor()ã??
+å?¯ç?¨PMDå??页é??é??è¦?å?¨PMD表å??é??æ?¶è°?ç?¨pagetable_pmd_ctor()ï¼?å?¨é??æ?¾æ?¶è°?
+ç?¨pagetable_pmd_dtor()ã??
 
 å??é??é??常å??ç??å?¨pmd_alloc_one()中ï¼?é??æ?¾å??ç??å?¨pmd_free()å??pmd_free_tlb()
 中ï¼?ä½?è¦?ç¡®ä¿?è¦?ç??æ??æ??ç??PMD表å??é??/é??æ?¾è·¯å¾?ï¼?å?³X86_PAEå?¨pgd_alloc()中é¢?å??
@@ -73,7 +73,7 @@ å??é??ä¸?äº?PMDã??
 
 ä¸?å??就绪å??ï¼?ä½ å?¯ä»¥è®¾ç½®CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCKã??
 
-注æ??ï¼?pgtable_pte_page_ctor()å??pgtable_pmd_page_ctor()å?¯è?½å¤±è´¥--å¿?
+注æ??ï¼?pagetable_pte_ctor()å??pagetable_pmd_ctor()å?¯è?½å¤±è´¥--å¿?
 须正确å¤?ç??ã??
 
 page->ptl
@@ -90,7 +90,7 @@ 为äº?é?¿å??å¢?å? struct pageç??大å°?å¹
    ç??æ??é??并å?¨æ??å??é??å®?ã??è¿?å??许å?¨å?¯ç?¨DEBUG_SPINLOCKæ??DEBUG_LOCK_ALLOCç??
    æ??å?µä¸?使ç?¨å??页é??ï¼?ä½?ç?±äº?é?´æ?¥è®¿é?®è??å¤?è?±äº?ä¸?个ç¼?å­?è¡?ã??
 
-PTE表ç??spinlock_tå??é??å?¨pgtable_pte_page_ctor()中ï¼?PMD表ç??spinlock_t
-å??é??å?¨pgtable_pmd_page_ctor()中ã??
+PTE表ç??spinlock_tå??é??å?¨pagetable_pte_ctor()中ï¼?PMD表ç??spinlock_t
+å??é??å?¨pagetable_pmd_ctor()中ã??
 
 请ä¸?è¦?ç?´æ?¥è®¿é?®page->ptl - -使ç?¨é??å½?ç??è¾?å?©å?½æ?°ã??
--- a/include/linux/mm.h~mm-remove-pgtable_pmd-pte_page_ctor-dtor-wrappers
+++ a/include/linux/mm.h
@@ -2926,11 +2926,6 @@ static inline bool pagetable_pte_ctor(st
 	return true;
 }
 
-static inline bool pgtable_pte_page_ctor(struct page *page)
-{
-	return pagetable_pte_ctor(page_ptdesc(page));
-}
-
 static inline void pagetable_pte_dtor(struct ptdesc *ptdesc)
 {
 	struct folio *folio = ptdesc_folio(ptdesc);
@@ -2940,11 +2935,6 @@ static inline void pagetable_pte_dtor(st
 	lruvec_stat_sub_folio(folio, NR_PAGETABLE);
 }
 
-static inline void pgtable_pte_page_dtor(struct page *page)
-{
-	pagetable_pte_dtor(page_ptdesc(page));
-}
-
 pte_t *__pte_offset_map(pmd_t *pmd, unsigned long addr, pmd_t *pmdvalp);
 static inline pte_t *pte_offset_map(pmd_t *pmd, unsigned long addr)
 {
@@ -3051,11 +3041,6 @@ static inline bool pagetable_pmd_ctor(st
 	return true;
 }
 
-static inline bool pgtable_pmd_page_ctor(struct page *page)
-{
-	return pagetable_pmd_ctor(page_ptdesc(page));
-}
-
 static inline void pagetable_pmd_dtor(struct ptdesc *ptdesc)
 {
 	struct folio *folio = ptdesc_folio(ptdesc);
@@ -3065,11 +3050,6 @@ static inline void pagetable_pmd_dtor(st
 	lruvec_stat_sub_folio(folio, NR_PAGETABLE);
 }
 
-static inline void pgtable_pmd_page_dtor(struct page *page)
-{
-	pagetable_pmd_dtor(page_ptdesc(page));
-}
-
 /*
  * No scalability reason to split PUD locks yet, but follow the same pattern
  * as the PMD locks to make it easier if we decide to.  The VM should not be
_

Patches currently in -mm which might be from vishal.moola@xxxxxxxxx are

mm-add-page_type_op-folio-functions.patch
pgtable-create-struct-ptdesc.patch
mm-add-utility-functions-for-ptdesc.patch
mm-convert-pmd_pgtable_page-callers-to-use-pmd_ptdesc.patch
mm-convert-ptlock_alloc-to-use-ptdescs.patch
mm-convert-ptlock_ptr-to-use-ptdescs.patch
mm-convert-pmd_ptlock_init-to-use-ptdescs.patch
mm-convert-ptlock_init-to-use-ptdescs.patch
mm-convert-pmd_ptlock_free-to-use-ptdescs.patch
mm-convert-ptlock_free-to-use-ptdescs.patch
mm-create-ptdesc-equivalents-for-pgtable_ptepmd_page_ctordtor.patch
powerpc-convert-various-functions-to-use-ptdescs.patch
x86-convert-various-functions-to-use-ptdescs.patch
s390-convert-various-pgalloc-functions-to-use-ptdescs.patch
mm-remove-page-table-members-from-struct-page.patch
pgalloc-convert-various-functions-to-use-ptdescs.patch
arm-convert-various-functions-to-use-ptdescs.patch
arm64-convert-various-functions-to-use-ptdescs.patch
csky-convert-__pte_free_tlb-to-use-ptdescs.patch
hexagon-convert-__pte_free_tlb-to-use-ptdescs.patch
loongarch-convert-various-functions-to-use-ptdescs.patch
m68k-convert-various-functions-to-use-ptdescs.patch
mips-convert-various-functions-to-use-ptdescs.patch
nios2-convert-__pte_free_tlb-to-use-ptdescs.patch
openrisc-convert-__pte_free_tlb-to-use-ptdescs.patch
riscv-convert-alloc_pmd-pte_late-to-use-ptdescs.patch
sh-convert-pte_free_tlb-to-use-ptdescs.patch
sparc64-convert-various-functions-to-use-ptdescs.patch
sparc-convert-pgtable_pte_page_ctor-dtor-to-ptdesc-equivalents.patch
um-convert-pmd-pte_free_tlb-to-use-ptdescs.patch
mm-remove-pgtable_pmd-pte_page_ctor-dtor-wrappers.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux