On 11/29/26 21:22, Suren Baghdasaryan wrote:
> VM_FAULT_RETRY is returned from the page fault path for two different
> reasons.  Usually it means that the fault handler had to drop its lock,
> typically to wait for something, and the fault has to be handled again.
> With per-VMA locks it is also returned when the fault can not be handled
> under the per-VMA lock at all and has to be handled under mmap_lock. The
> architecture fault handlers can not tell these two cases apart, so every
> VM_FAULT_RETRY from a fault handled under the per-VMA lock results in a
> retry under mmap_lock.

I think having a separate return value makes sense.

just wondering, whether something like

VM_FAULT_NEED_MM_LOCK

would be clearer while we are at it.

-- 
Cheers,

David

Reply via email to