* [PATCH v2] mm/hugetlb: Remove unnecessary huge_ptep_set_access_flags() in hugetlb_mcopy_atomic_pte()
@ 2022-05-27 2:01 Baolin Wang
0 siblings, 0 replies; only message in thread
From: Baolin Wang @ 2022-05-27 2:01 UTC (permalink / raw)
To: mike.kravetz, akpm, songmuchun
Cc: anshuman.khandual, baolin.wang, linux-kernel, linux-mm
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() in
hugetlb_mcopy_atomic_pte().
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
Changes from v1:
- Update commit message to remove checkpatch.pl complaint.
- Collect reviewed-by tags.
---
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 */
--
1.8.3.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-27 2:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-27 2:01 [PATCH v2] mm/hugetlb: Remove unnecessary huge_ptep_set_access_flags() in hugetlb_mcopy_atomic_pte() Baolin Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox