Re: [RFC PATCH v3] mm: retry page faults under per-VMA lock when mmap_lock is not required

From: Barry Song

Date: Fri Jul 10 2026 - 19:37:27 EST


On Fri, Jul 10, 2026 at 10:54 PM Suren Baghdasaryan <surenb@xxxxxxxxxx> wrote:
[...]
> > Have you audited every single VM_FAULT_RETRY case? Because getting this
> > wrong could be a serious problem and break things. You should include a
> > list of call sites in your patch and explain why it's fine in each case.
>
> That's my main worry with this patch as well. I think a better
> approach would keep VM_FAULT_RETRY as is (falling back to mmap_lock),
> introduce VM_FAULT_RETRY_VMA (or whatever is best to indicate a retry
> with VMA lock) and then convert individual VM_FAULT_RETRY cases to
> VM_FAULT_RETRY_VMA with proper reasoning and explanation why it is
> safe. Less churn, gradual conversion, and happy reviewers.
>

I am not really sure there are any happy reviewers here.
VM_FAULT_RETRY_VMA and the gradual migration to per-VMA lock retry
are exactly what was done in the previous versions, even since RFC v1[1] :-)

[1] https://lore.kernel.org/all/20251127011438.6918-1-21cnbao@xxxxxxxxx/