Re: [PATCH 1/2] mm/mempolicy: Checking hstate for hugetlbfs page in vma_migratable

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

 



On Tue, 14 Jan 2020 09:16:17 +0000 Li Xinhai <lixinhai.lxh@xxxxxxxxx> wrote:

> Checking hstate at early phase when isolating page, instead of during
> unmap and move phase, to avoid useless isolation.
> 
> ...
>
> --- a/include/linux/mempolicy.h
> +++ b/include/linux/mempolicy.h
> @@ -185,10 +185,9 @@ static inline bool vma_migratable(struct vm_area_struct *vma)
>  	if (vma_is_dax(vma))
>  		return false;
>  
> -#ifndef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
> -	if (vma->vm_flags & VM_HUGETLB)
> +	if (is_vm_hugetlb_page(vma) &&
> +		!hugepage_migration_supported(hstate_vma(vma)))
>  		return false;
> -#endif
>  
>  	/*
>  	 * Migration allocates pages in the highest zone. If we cannot

x86_64 allmodconfig:

In file included from ./include/linux/hugetlb.h:26:0,
                 from arch/x86/mm/fault.c:15:
./include/linux/mempolicy.h: In function vma_migratable:
./include/linux/mempolicy.h:190:4: error: implicit declaration of function hugepage_migration_supported; did you mean thp_migration_supported? [-Werror=implicit-function-declaration]
   !hugepage_migration_supported(hstate_vma(vma)))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

the obvious fix didn't work.




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

  Powered by Linux