Re: [RFC PATCH v5] mm: retry page faults once under the per-VMA lock

Hongru Zhang <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.kernel.mm
Message-ID <CAF3qr_LC_UFcUtQrqnVvzD8LHD_YzCBcw4ndCxD28Wqs-F-kTA@mail.gmail.com>
On Sat, Aug 15, 2026 at 2:51 AM Andrew Morton <[email protected]> wrote:
>
> On Fri, 14 Aug 2026 16:53:00 +0800 Hongru Zhang <[email protected]> wrote:
>
> > From: Hongru Zhang <[email protected]>
> >
> > The per-VMA lock fault path falls back to mmap_lock on VM_FAULT_RETRY.
> > When mmap_lock is write-contended, the fallback can reduce page-fault
> > throughput.
> >
> > Add a single retry under the per-VMA lock in the arch fault handler
> > instead of adding a new VM_FAULT_* flag.
> >
> > ...
> >
> > Swap Throughput (higher is better):
> > +--------------+-------------+---------------------------+
> > | mmap writers |   Vanilla   |          Patched          |
> > +--------------+-------------+---------------------------+
> > |      0       | 17303.09 /s | 17899.48 /s       (+3.4%) |
> > +--------------+-------------+---------------------------+
> > |      4       | 12596.23 /s | 16095.20 /s      (+27.8%) |
> > +--------------+-------------+---------------------------+
> > |      8       |     0.58 /s | 15420.57 /s (+2658619.0%) |
> > +--------------+-------------+---------------------------+
>
> Well.
>
> > With increasing mmap_lock write pressure, Vanilla degrades sharply and
> > drops to near zero at eight writers. Patched kernel holds up much better.
>
> Thanks for working on this.
>
> Are you able to help us understand how much effect this change will
> have upon any real-world workloads?

Thanks for raising this.

I'll run some real-world workload tests and follow up with the results.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.