lkml.org 
[lkml]   [2022]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mm/hugetlb: Remove unnecessary huge_ptep_set_access_flags() in hugetlb_mcopy_atomic_pte()
From


On 5/25/22 15:56, Baolin Wang wrote:
> There is no need to update the hugetlb access flags after just setting the
> hugetlb page table entry by set_huge_pte_at(), since the page table entry
> value has no changes. Thus remove the unnecessary huge_ptep_set_access_flags()

WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#9:
value has no changes. Thus remove the unnecessary huge_ptep_set_access_flags()

total: 0 errors, 1 warnings, 8 lines checked

> in hugetlb_mcopy_atomic_pte().
>
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>

Otherwise LGTM,

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>

> ---
> mm/hugetlb.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 7c468ac..3ad49bf 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -6032,8 +6032,6 @@ int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm,
>
> set_huge_pte_at(dst_mm, dst_addr, dst_pte, _dst_pte);
>
> - (void)huge_ptep_set_access_flags(dst_vma, dst_addr, dst_pte, _dst_pte,
> - dst_vma->vm_flags & VM_WRITE);
> hugetlb_count_add(pages_per_huge_page(h), dst_mm);
>
> /* No need to invalidate - it was non-present before */

\
 
 \ /
  Last update: 2022-05-26 09:03    [W:0.559 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site