[PATCH 0/5] Misc rework on hugetlb_fault

From: Oscar Salvador
Date: Thu Jun 12 2025 - 09:50:52 EST


RFC -> v1:
- Stop looking up folio in the pagecache for detecting a COW
on a private mapping.
- Document the locks

Hi,

This is a new version of the RFC I sent a couple of weeks ago [1].
It's the conclusion of the discussions that ocurred in that thread.

Patch#1 is the fix for the deadlock.
Patch#2 is to document why we take the lock, so none of us have to spend
time again in figuring that out.
Patch#3-5 are a bit of cleanup (removing obsolete comments etc.)

More detail in every patch.

Oscar Salvador (5):
mm,hugetlb: Change mechanism to detect a COW on private mapping
mm,hugetlb: Document the reason to lock the folio in the faulting path
mm,hugetlb: Conver anon_rmap into boolean
mm,hugetlb: Drop obsolete comment about non-present pte and second
faults
mm,hugetlb: Drop unlikelys from hugetlb_fault

mm/hugetlb.c | 98 +++++++++++++++++++---------------------------------
1 file changed, 36 insertions(+), 62 deletions(-)

--
2.49.0