mm-thp-remove-pmd_huge_split_prepare.patch removed from -mm tree
The patch titled
Subject: mm/thp: remove pmd_huge_split_prepare()
has been removed from the -mm tree. Its filename was
mm-thp-remove-pmd_huge_split_prepare.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: "Aneesh Kumar K.V" <[email protected]>
Subject: mm/thp: remove pmd_huge_split_prepare()
Instead of marking the pmd ready for split, invalidate the pmd. This should take care of powerpc requirement. Only side effect is that we mark the pmd invalid early. This can result in us blocking access to the page a bit longer if we race against a thp split.
[[email protected]: rebased, dirty THP once]
Signed-off-by Aneesh Kumar K.V <[email protected]>
Signed-off-by Kirill A. Shutemov <[email protected]>
Cc Andrea Arcangeli <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc David Daney <[email protected]>
Cc David Miller <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Nitin Gupta <[email protected]>
Cc Ralf Baechle <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vineet Gupta <[email protected]>
Cc Vlastimil Babka <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
arch/powerpc/include/asm/book3s/64/hash-4k.h | 2 arch/powerpc/include/asm/book3s/64/hash-64k.h | 2 arch/powerpc/include/asm/book3s/64/pgtable.h | 9 -- arch/powerpc/include/asm/book3s/64/radix.h | 6 - arch/powerpc/mm/pgtable-hash64.c | 22 ---- include/asm-generic/pgtable.h | 8 - mm/huge_memory.c | 72 +++++++--------- 7 files changed, 35 insertions(+), 86 deletions(-)
arch/powerpc/include/asm/book3s/64/hash-4k.h renamed from arch/powerpc/include/asm/book3s/64/hash-4k.h~mm-thp-remove-pmd_huge_split_prepare +0 -2
@@ -101,8 +101,6 @@ extern pmd_t hash__pmdp_collapse_flush(sextern void hash__pgtable_trans_huge_deposit (struct mm_struct *mm,pmd_t *pmdp,pgtable_t pgtable);extern pgtable_t hash__pgtable_trans_huge_withdraw (struct mm_struct *mm,pmd_t *pmdp); -extern void hash__pmdp_huge_split_prepare (struct vm_area_struct *vma, -unsigned long address,pmd_t *pmdp);extern pmd_t hash__pmdp_huge_get_and_clear (struct mm_struct *mm,unsigned long addr,pmd_t *pmdp);extern int hash__has_transparent_hugepage (void );
arch/powerpc/include/asm/book3s/64/hash-64k.h renamed from arch/powerpc/include/asm/book3s/64/hash-64k.h~mm-thp-remove-pmd_huge_split_prepare +0 -2
@@ -203,8 +203,6 @@ extern pmd_t hash__pmdp_collapse_flush(sextern void hash__pgtable_trans_huge_deposit (struct mm_struct *mm,pmd_t *pmdp,pgtable_t pgtable);extern pgtable_t hash__pgtable_trans_huge_withdraw (struct mm_struct *mm,pmd_t *pmdp); -extern void hash__pmdp_huge_split_prepare (struct vm_area_struct *vma, -unsigned long address,pmd_t *pmdp);extern pmd_t hash__pmdp_huge_get_and_clear (struct mm_struct *mm,unsigned long addr,pmd_t *pmdp);extern int hash__has_transparent_hugepage (void );
arch/powerpc/include/asm/book3s/64/pgtable.h renamed from arch/powerpc/include/asm/book3s/64/pgtable.h~mm-thp-remove-pmd_huge_split_prepare +0 -9
@@ -1140,15 +1140,6 @@ static inline pgtable_t pgtable_trans_huextern pmd_t pmdp_invalidate (struct vm_area_struct *vma,unsigned long address,pmd_t *pmdp); -#define __HAVE_ARCH_PMDP_HUGE_SPLIT_PREPARE -static inline void pmdp_huge_split_prepare (struct vm_area_struct *vma, -unsigned long address,pmd_t *pmdp) -{ -if (radix_enabled ()) -return radix__pmdp_huge_split_prepare (vma, address, pmdp); -return hash__pmdp_huge_split_prepare (vma, address, pmdp); -} -#define pmd_move_must_withdraw pmd_move_must_withdrawstruct spinlock ; static inline int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl,
arch/powerpc/include/asm/book3s/64/radix.h renamed from arch/powerpc/include/asm/book3s/64/radix.h~mm-thp-remove-pmd_huge_split_prepare +0 -6
@@ -269,12 +269,6 @@ static inline pmd_t radix__pmd_mkhuge(pmreturn __pmd (pmd_val (pmd) | _PAGE_PTE |R_PAGE_LARGE );return __pmd (pmd_val (pmd) | _PAGE_PTE); } -static inline void radix__pmdp_huge_split_prepare (struct vm_area_struct *vma, -unsigned long address,pmd_t *pmdp) -{ -/* Nothing to do for radix. */ -return ; -} extern unsigned long radix__pmd_hugepage_update(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, unsigned long clr,
arch/powerpc/mm/pgtable-hash64.c renamed from arch/powerpc/mm/pgtable-hash64.c~mm-thp-remove-pmd_huge_split_prepare +0 -22
@@ -296,28 +296,6 @@ pgtable_t hash__pgtable_trans_huge_withdreturn pgtable; } -void hash__pmdp_huge_split_prepare (struct vm_area_struct *vma, -unsigned long address,pmd_t *pmdp) -{ -VM_BUG_ON (address & ~HPAGE_PMD_MASK ); -VM_BUG_ON (REGION_ID (address) !=USER_REGION_ID ); -VM_BUG_ON (pmd_devmap (*pmdp)); - -/* -* We can't mark the pmd none here, because that will cause a race -* against exit_mmap. We need to continue mark pmd TRANS HUGE, while -* we spilt, but at the same time we wan't rest of the ppc64 code -* not to insert hash pte on this, because we will be modifying -* the deposited pgtable in the caller of this function. Hence -* clear the _PAGE_USER so that we move the fault handling to -* higher level function and that will serialize against ptl. -* We need to flush existing hash pte entries here even though, -* the translation is still valid, because we will withdraw -* pgtable_t after this. -*/ -pmd_hugepage_update (vma->vm_mm, address, pmdp,0 , _PAGE_PRIVILEGED); -} -/* * A linux hugepage PMD was changed and the corresponding hash table entries * neesd to be flushed.
include/asm-generic/pgtable.h renamed from include/asm-generic/pgtable.h~mm-thp-remove-pmd_huge_split_prepare +0 -8
@@ -329,14 +329,6 @@ extern pmd_t pmdp_invalidate(struct vm_a pmd_t *pmdp);#endif -#ifndef __HAVE_ARCH_PMDP_HUGE_SPLIT_PREPARE -static inline void pmdp_huge_split_prepare (struct vm_area_struct *vma, -unsigned long address,pmd_t *pmdp) -{ - -} -#endif -#ifndef __HAVE_ARCH_PTE_SAMEstatic inline int pte_same (pte_t pte_a,pte_t pte_b) {
mm/huge_memory.c renamed from mm/huge_memory.c~mm-thp-remove-pmd_huge_split_prepare +35 -36
96 lines not on this page · raw message