"Kirill A. Shutemov" <kirill.shute...@linux.intel.com> writes:
> With new refcounting we don't need to mark PMDs splitting. Let's drop > code to handle this. > > Signed-off-by: Kirill A. Shutemov <kirill.shute...@linux.intel.com> > Tested-by: Sasha Levin <sasha.le...@oracle.com> > --- > arch/x86/include/asm/pgtable.h | 9 --------- > arch/x86/include/asm/pgtable_types.h | 2 -- > arch/x86/mm/gup.c | 13 +------------ > arch/x86/mm/pgtable.c | 14 -------------- > 4 files changed, 1 insertion(+), 37 deletions(-) > > diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h > index f89d6c9943ea..21a2e25a5393 100644 > --- a/arch/x86/include/asm/pgtable.h > +++ b/arch/x86/include/asm/pgtable.h > @@ -158,11 +158,6 @@ static inline int pmd_large(pmd_t pte) > } > > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > -static inline int pmd_trans_splitting(pmd_t pmd) > -{ > - return pmd_val(pmd) & _PAGE_SPLITTING; > -} > - > static inline int pmd_trans_huge(pmd_t pmd) > { > return pmd_val(pmd) & _PAGE_PSE; > @@ -792,10 +787,6 @@ extern int pmdp_clear_flush_young(struct vm_area_struct > *vma, > unsigned long address, pmd_t *pmdp); > > > -#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH > -extern void pmdp_splitting_flush(struct vm_area_struct *vma, > - unsigned long addr, pmd_t *pmdp); > - Can we keep pmdp_splitting_flush or a variant and use that before a hugepage split ? That is to have a special function to do pmd_clear before splitting ?. We still depend on a IPI to be send to other cpus on split and not all archs will do that in pmdp_clear_flush_notify. I guess we need the ipi to make sure a local_irq_disable can prevent a parallel split ? Something like ? diff --git a/mm/huge_memory.c b/mm/huge_memory.c index cce4604c192f..0a0d00b21f76 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2608,7 +2608,7 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd, young = pmd_young(*pmd); /* leave pmd empty until pte is filled */ - pmdp_clear_flush_notify(vma, haddr, pmd); + pmdp_splitting_clear_flush_notify(vma, haddr, pmd); pgtable = pgtable_trans_huge_withdraw(mm, pmd); pmd_populate(mm, &_pmd, pgtable); -aneesh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/