Re: [PATCH v2 0/5] mm: reduce mmap_lock contention and improve page fault performance

From: Hillf Danton

Date: Tue May 19 2026 - 22:05:22 EST


On Thu, 30 Apr 2026 13:37:14 +0100 Matthew Wilcox wrote:
> On Thu, Apr 30, 2026 at 12:04:22PM +0800, Barry Song (Xiaomi) wrote:
> > (1) If we need to wait for I/O completion, we still drop the per-VMA lock, as
> > current page fault handling already does. Holding it for too long may introduce
> > various priority inversion issues on mobile devices. After I/O completes, we
> > retry the page fault with the per-VMA lock, rather than falling back to
> > mmap_lock.
>
> You're going to have to do better than that. You know I hate the
> additional complexity you're adding. You need to explain why my idea of
> ripping out all the complexity now that we have per-VMA locks doesn't
> work.
>
Priority inversion can not be avoided given a lock like rwsem but the light
at the end of the tunnel is proxy execution. Even though I suspect it helps
the vma lock, a good instance of paying the price for inventing wheel in the 2020s.