linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] hugetlb: fixes for new vma lock series
@ 2022-10-05  1:17 Mike Kravetz
  2022-10-05  1:17 ` [PATCH 1/3] hugetlb: fix vma lock handling during split vma and range unmapping Mike Kravetz
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Mike Kravetz @ 2022-10-05  1:17 UTC (permalink / raw)
  To: linux-mm, linux-kernel
  Cc: Muchun Song, Miaohe Lin, David Hildenbrand, Sven Schnelle,
	Michal Hocko, Peter Xu, Naoya Horiguchi, Aneesh Kumar K . V,
	Andrea Arcangeli, Kirill A . Shutemov, Davidlohr Bueso,
	Prakash Sangappa, James Houghton, Mina Almasry, Pasha Tatashin,
	Axel Rasmussen, Ray Fucillo, Andrew Morton, Mike Kravetz

In review of the series "hugetlb: Use new vma lock for huge pmd sharing
synchronization", Miaohe Lin pointed out two key issues:
1) There is a race in the routine hugetlb_unmap_file_folio when locks
   are dropped and reacquired in the correct order [1].
2) With the switch to using vma lock for fault/truncate synchronization,
   we need to make sure lock exists for all VM_MAYSHARE vmas, not just
   vmas capable of pmd sharing.

These two issues are addressed here.  In addition, having a vma lock
present in all VM_MAYSHARE vmas, uncovered some issues around vma
splitting.  Those are also addressed.

The series "hugetlb: Use new vma lock for huge pmd sharing synchronization"
is currently in mm-stable and may soon be merged???  This is why I am
sending 'fixes' to that series instead of a new version.  If a new
version of the series is preferred, I can do that.  Just wanted to get
these changes out for review.

[1] https://lore.kernel.org/linux-mm/01f10195-7088-4462-6def-909549c75ef4@huawei.com/

Mike Kravetz (3):
  hugetlb: fix vma lock handling during split vma and range unmapping
  hugetlb: take hugetlb vma_lock when clearing vma_lock->vma pointer
  hugetlb: allocate vma lock for all sharable vmas

 mm/hugetlb.c | 127 +++++++++++++++++++++++++++------------------------
 mm/memory.c  |   4 --
 2 files changed, 68 insertions(+), 63 deletions(-)

-- 
2.37.3



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-10-18  6:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05  1:17 [PATCH 0/3] hugetlb: fixes for new vma lock series Mike Kravetz
2022-10-05  1:17 ` [PATCH 1/3] hugetlb: fix vma lock handling during split vma and range unmapping Mike Kravetz
2022-10-15  1:25   ` Miaohe Lin
2022-10-18  2:56     ` Mike Kravetz
2022-10-18  6:25       ` Miaohe Lin
2022-10-05  1:17 ` [PATCH 2/3] hugetlb: take hugetlb vma_lock when clearing vma_lock->vma pointer Mike Kravetz
2022-10-05  3:48   ` kernel test robot
2022-10-05  6:58   ` kernel test robot
2022-10-06  3:30   ` Mike Kravetz
2022-10-15  1:32     ` Miaohe Lin
2022-10-05  1:17 ` [PATCH 3/3] hugetlb: allocate vma lock for all sharable vmas Mike Kravetz
2022-10-15  1:40   ` Miaohe Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).