Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Hongru Zhang <zhanghongru06@gmail.com>
Cc: linux-mm@kvack.org, david@kernel.org, liam@infradead.org,
	linux-kernel@vger.kernel.org, ljs@kernel.org, baohua@kernel.org,
	mhocko@suse.com, rppt@kernel.org, shakeel.butt@linux.dev,
	surenb@google.com, vbabka@kernel.org, willy@infradead.org,
	zhanghongru@xiaomi.com
Subject: Re: [RFC PATCH v5] mm: retry page faults once under the per-VMA lock
Date: Fri, 14 Aug 2026 11:51:00 -0700	[thread overview]
Message-ID: <20260814115100.24a6be0cd0e672cc3c051f86@linux-foundation.org> (raw)
In-Reply-To: <20260814085300.399107-1-zhanghongru@xiaomi.com>

On Fri, 14 Aug 2026 16:53:00 +0800 Hongru Zhang <zhanghongru06@gmail.com> wrote:

> From: Hongru Zhang <zhanghongru@xiaomi.com>
> 
> 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?


  reply	other threads:[~2026-08-14 18:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14  8:53 [RFC PATCH v5] mm: retry page faults once under the per-VMA lock Hongru Zhang
2026-08-14 18:51 ` Andrew Morton [this message]
2026-08-17  3:02   ` Hongru Zhang
2026-08-17  3:57     ` Barry Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260814115100.24a6be0cd0e672cc3c051f86@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=david@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=willy@infradead.org \
    --cc=zhanghongru06@gmail.com \
    --cc=zhanghongru@xiaomi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox