Re: [PATCHv5 18/28] x86, thp: remove infrastructure for handling splitting PMDs

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

 



"Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> 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.shutemov@xxxxxxxxxxxxxxx>
> Tested-by: Sasha Levin <sasha.levin@xxxxxxxxxx>
> ---
>  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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]