All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Handle hugetlb faults under the VMA lock
@ 2024-02-20 23:14 Vishal Moola (Oracle)
  2024-02-20 23:14 ` [PATCH 1/3] mm/memory: Change vmf_anon_prepare() to be non-static Vishal Moola (Oracle)
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Vishal Moola (Oracle) @ 2024-02-20 23:14 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel, akpm, muchun.song, Vishal Moola (Oracle)

It is generally safe to handle hugetlb faults under the VMA lock. The
only time this is unsafe is when no anon_vma has been allocated to this
vma yet, so we can use vmf_anon_prepare() instead of anon_vma_prepare()
to bailout if necessary. This may only happen for the first non-shared
hugetlb page in the vma.

-----
The last patch in this series may cause ltp hugemmap10 to "fail". This
is expected behavior - see the commit message for patch 3 in this series.
The rest of the ltp hugetlb tests pass.

This patchset applies cleanly ontop of mm-unstable.

Vishal Moola (Oracle) (3):
  mm/memory: Change vmf_anon_prepare() to be non-static
  hugetlb: Use vmf_anon_prepare() instead of anon_vma_prepare()
  hugetlb: Allow faults to be handled under the VMA lock

 include/linux/hugetlb.h |  1 +
 mm/hugetlb.c            | 33 +++++++++++++++++++++------------
 mm/memory.c             |  2 +-
 3 files changed, 23 insertions(+), 13 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2024-02-21 19:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-20 23:14 [PATCH 0/3] Handle hugetlb faults under the VMA lock Vishal Moola (Oracle)
2024-02-20 23:14 ` [PATCH 1/3] mm/memory: Change vmf_anon_prepare() to be non-static Vishal Moola (Oracle)
2024-02-21  3:36   ` Matthew Wilcox
2024-02-21 16:49     ` Vishal Moola
2024-02-21 17:30   ` kernel test robot
2024-02-21 19:37   ` kernel test robot
2024-02-20 23:14 ` [PATCH 2/3] hugetlb: Use vmf_anon_prepare() instead of anon_vma_prepare() Vishal Moola (Oracle)
2024-02-21  3:46   ` Matthew Wilcox
2024-02-21 17:15     ` Vishal Moola
2024-02-21 17:55       ` Matthew Wilcox
2024-02-21 18:02         ` Vishal Moola
2024-02-20 23:14 ` [PATCH 3/3] hugetlb: Allow faults to be handled under the VMA lock Vishal Moola (Oracle)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.