Re: [mm-unstable v7 01/18] mm/khugepaged: remove redundant transhuge_vma_suitable() check

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

 



On Wed, Jul 6, 2022 at 5:06 PM Zach O'Keefe <zokeefe@xxxxxxxxxx> wrote:
>
> transhuge_vma_suitable() is called twice in hugepage_vma_revalidate()
> path.  Remove the first check, and rely on the second check inside
> hugepage_vma_check().
>
> Signed-off-by: Zach O'Keefe <zokeefe@xxxxxxxxxx>
> ---
>  mm/khugepaged.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index cfe231c5958f..5269d15e20f6 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -918,8 +918,6 @@ static int hugepage_vma_revalidate(struct mm_struct *mm, unsigned long address,
>         if (!vma)
>                 return SCAN_VMA_NULL;
>
> -       if (!transhuge_vma_suitable(vma, address))
> -               return SCAN_ADDRESS_RANGE;

It seems this is the only user of SCAN_ADDRESS_RANGE, so
SCAN_ADDRESS_RANGE could be deleted as well.

>         if (!hugepage_vma_check(vma, vma->vm_flags, false, false))
>                 return SCAN_VMA_CHECK;
>         /*
> --
> 2.37.0.rc0.161.g10f37bed90-goog
>




[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