Re: [RFC PATCH v3] mm: retry page faults under per-VMA lock when mmap_lock is not required
From: Hongru Zhang
Date: Thu Jul 09 2026 - 04:50:45 EST
Hi David, Lorenzo,
Thanks a lot for the detailed review.
Yes, Barry and I discussed this offline, and I am taking over the series from
this version, with his agreement.
I agree that VM_FAULT_RETRY_HARD is a poor name. I will rename it to
something that makes the mmap_lock requirement explicit, and document the
semantics more clearly, including how it relates to VM_FAULT_RETRY.
Lorenzo, I agree that the unbounded VMA-lock retry needs to be addressed. I
will look into ways to bound or otherwise avoid unbounded retries under the
VMA lock, and benchmark the candidate approaches.
I will also look into deduplicating the arch fault-handler changes by adding
common helpers, so the arch code does not have to open-code this logic.
For the retry sites, I will audit all sites that return VM_FAULT_RETRY and
document the reasoning in the next version. In particular, I will look closely
at the userfaultfd released path, do_huge_pmd_device_private(), and the
FAULT_FLAG_RETRY_NOWAIT case, and update the stale comments where needed.
I will also fix the subject and make sure the next respin includes the full
maintainer/reviewer list reported by get_maintainer.pl.
Thanks,
Hongru