mm-gup-retire-follow_hugetlb_page.patch removed from -mm tree
The quilt patch titled
Subject: mm/gup: retire follow_hugetlb_page()
has been removed from the -mm tree. Its filename was
mm-gup-retire-follow_hugetlb_page.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/gup: retire follow_hugetlb_page()
Date: Wed, 28 Jun 2023 17:53:08 -0400
Now __get_user_pages() should be well prepared to handle thp completely, as long as hugetlb gup requests even without the hugetlb's special path.
Time to retire follow_hugetlb_page().
Tweak misc comments to reflect reality of follow_hugetlb_page()'s removal.
---
fs/userfaultfd.c | 2 include/linux/hugetlb.h | 12 -- mm/gup.c | 19 --- mm/hugetlb.c | 224 -------------------------------------- 4 files changed, 1 insertion(+), 256 deletions(-)
fs/userfaultfd.c renamed from fs/userfaultfd.c~mm-gup-retire-follow_hugetlb_page +1 -1
@@ -427,7 +427,7 @@ vm_fault_t handle_userfault(struct vm_fa* * We also don't do userfault handling during * coredumping. hugetlbfs has the special -* follow_hugetlb_page() to skip missing pages in the +* hugetlb_follow_page_mask() to skip missing pages in the * FOLL_DUMP case, anon memory also checks for FOLL_DUMP with * the no_page_table() helper in follow_page_mask(), but the * shmem_vm_ops->fault method is invoked even during
include/linux/hugetlb.h renamed from include/linux/hugetlb.h~mm-gup-retire-follow_hugetlb_page +0 -12
@@ -133,9 +133,6 @@ int copy_hugetlb_page_range(struct mm_ststruct page *hugetlb_follow_page_mask (struct vm_area_struct *vma,unsigned long address,unsigned int flags,unsigned int *page_mask); -long follow_hugetlb_page (struct mm_struct *,struct vm_area_struct *, -struct page **,unsigned long *,unsigned long *, -long ,unsigned int ,int *);void unmap_hugepage_range (struct vm_area_struct *,unsigned long ,unsigned long ,struct page *,zap_flags_t );
@@ -305,15 +302,6 @@ static inline struct page *hugetlb_folloBUILD_BUG ();/* should never be compiled in if !CONFIG_HUGETLB_PAGE*/ } -static inline long follow_hugetlb_page (struct mm_struct *mm, -struct vm_area_struct *vma,struct page **pages, -unsigned long *position,unsigned long *nr_pages, -long i,unsigned int flags,int *nonblocking) -{ -BUG (); -return 0 ; -} - static inline int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, struct vm_area_struct *dst_vma,
mm/gup.c renamed from mm/gup.c~mm-gup-retire-follow_hugetlb_page +0 -19
@@ -819,9 +819,6 @@ static struct page *follow_page_mask(str* Call hugetlb_follow_page_mask for hugetlb vmas as it will use * special hugetlb page table walking code. This eliminates the * need to check for hugetlb entries in the general walking code. -* -* hugetlb_follow_page_mask is only for follow_page() handling here. -* Ordinary GUP uses follow_hugetlb_page for hugetlb processing. */ if (is_vm_hugetlb_page (vma)) return hugetlb_follow_page_mask(vma, address, flags,
@@ -1221,22 +1218,6 @@ static long __get_user_pages(struct mm_s ret =check_vma_flags (vma, gup_flags);if (ret) goto out; - -if (is_vm_hugetlb_page (vma)) { - i =follow_hugetlb_page (mm, vma, pages, - &start, &nr_pages, i, - gup_flags, locked); -if (!*locked) { -/* -* We've got a VM_FAULT_RETRY -* and we've lost mmap_lock. -* We must stop here. -*/ -BUG_ON (gup_flags &FOLL_NOWAIT ); - goto out; - } -continue ; - } } retry:/*
mm/hugetlb.c renamed from mm/hugetlb.c~mm-gup-retire-follow_hugetlb_page +0 -224
242 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are