mm-introduce-vma_pgtable_walk_beginend.patch removed from -mm tree
The quilt patch titled
Subject: mm: introduce vma_pgtable_walk_{begin|end}()
has been removed from the -mm tree. Its filename was
mm-introduce-vma_pgtable_walk_beginend.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Peter Xu <[email protected]>
Subject: mm: introduce vma_pgtable_walk_{begin|end}()
Date: Wed, 27 Mar 2024 11:23:23 -0400
Introduce per-vma begin()/end() helpers for pgtable walks. This is a preparation work to merge hugetlb pgtable walkers with generic mm.
The helpers need to be called before and after a pgtable walk, will start to be needed if the pgtable walker code supports hugetlb pages. It's a hook point for any type of VMA, but for now only hugetlb uses it to stablize the pgtable pages from getting away (due to possible pmd unsharing).
---
include/linux/mm.h | 3 +++ mm/memory.c | 12 ++++++++++++ 2 files changed, 15 insertions(+)
include/linux/mm.h renamed from include/linux/mm.h~mm-introduce-vma_pgtable_walk_beginend +3 -0
@@ -4230,4 +4230,7 @@ static inline bool pfn_is_unaccepted_mem return range_contains_unaccepted_memory(paddr, paddr + PAGE_SIZE); } +void vma_pgtable_walk_begin (struct vm_area_struct *vma); +void vma_pgtable_walk_end (struct vm_area_struct *vma); +#endif /* _LINUX_MM_H */
mm/memory.c renamed from mm/memory.c~mm-introduce-vma_pgtable_walk_beginend +12 -0
@@ -6378,3 +6378,15 @@ void ptlock_free(struct ptdesc *ptdesc) kmem_cache_free(page_ptl_cachep, ptdesc->ptl); }#endif + +void vma_pgtable_walk_begin (struct vm_area_struct *vma) +{ +if (is_vm_hugetlb_page (vma)) +hugetlb_vma_lock_read (vma); +} + +void vma_pgtable_walk_end (struct vm_area_struct *vma) +{ +if (is_vm_hugetlb_page (vma)) +hugetlb_vma_unlock_read (vma); +}
_
Patches currently in -mm which might be from [email protected] are
mm-userfaultfd-reset-ptes-when-close-for-wr-protected-ones.patch mm-hugetlb-assert-hugetlb_lock-in-__hugetlb_cgroup_commit_charge.patch mm-page_table_check-support-userfault-wr-protect-entries.patch