+ hugetlb-simplify-hugetlb-handling-in-follow_page_mask-v4.patch added to mm-unstable branch

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

 



The patch titled
     Subject: hugetlb-simplify-hugetlb-handling-in-follow_page_mask-v4
has been added to the -mm mm-unstable branch.  Its filename is
     hugetlb-simplify-hugetlb-handling-in-follow_page_mask-v4.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/hugetlb-simplify-hugetlb-handling-in-follow_page_mask-v4.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
Subject: hugetlb-simplify-hugetlb-handling-in-follow_page_mask-v4
Date: Fri, 28 Oct 2022 11:11:08 -0700

remove vma (pmd sharing) locking as this can be called with FOLL_NOWAIT,
per Peter

Link: https://lkml.kernel.org/r/20221028181108.119432-1-mike.kravetz@xxxxxxxxxx
Signed-off-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
Suggested-by: David Hildenbrand <david@xxxxxxxxxx>
Cc: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxx>
Cc: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Cc: Muchun Song <songmuchun@xxxxxxxxxxxxx>
Cc: Naoya Horiguchi <naoya.horiguchi@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


--- a/mm/hugetlb.c~hugetlb-simplify-hugetlb-handling-in-follow_page_mask-v4
+++ a/mm/hugetlb.c
@@ -6265,17 +6265,9 @@ struct page *hugetlb_follow_page_mask(st
 		return NULL;
 
 retry:
-	/*
-	 * vma lock prevents racing with another thread doing a pmd unshare.
-	 * This keeps pte as returned by huge_pte_offset valid.
-	 */
-	hugetlb_vma_lock_read(vma);
-
 	pte = huge_pte_offset(mm, haddr, huge_page_size(h));
-	if (!pte) {
-		hugetlb_vma_unlock_read(vma);
+	if (!pte)
 		return NULL;
-	}
 
 	ptl = huge_pte_lock(h, mm, pte);
 	entry = huge_ptep_get(pte);
@@ -6309,7 +6301,6 @@ retry:
 	}
 out:
 	spin_unlock(ptl);
-	hugetlb_vma_unlock_read(vma);
 	return page;
 }
 
_

Patches currently in -mm which might be from mike.kravetz@xxxxxxxxxx are

hugetlb-dont-delete-vma_lock-in-hugetlb-madv_dontneed-processing.patch
hugetlb-simplify-hugetlb-handling-in-follow_page_mask.patch
hugetlb-simplify-hugetlb-handling-in-follow_page_mask-v4.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux