From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Hongru Zhang <zhanghongru06@gmail.com>,
akpm@linux-foundation.org, linux-mm@kvack.org
Cc: ljs@kernel.org, liam@infradead.org, vbabka@kernel.org,
rppt@kernel.org, surenb@google.com, mhocko@suse.com,
baohua@kernel.org, shakeel.butt@linux.dev,
linux-kernel@vger.kernel.org,
Hongru Zhang <zhanghongru@xiaomi.com>
Subject: Re: [RFC PATCH v3] mm: retry page faults under per-VMA lock when mmap_lock is not required
Date: Tue, 7 Jul 2026 15:51:49 +0200 [thread overview]
Message-ID: <296662bf-66b9-4343-9104-afc56309b7fb@kernel.org> (raw)
In-Reply-To: <20260626075019.1833065-1-zhanghongru@xiaomi.com>
On 6/26/26 09:50, Hongru Zhang wrote:
> From: Hongru Zhang <zhanghongru@xiaomi.com>
>
> Currently, when a page fault returns VM_FAULT_RETRY under the per-VMA
> lock due to folio_lock() failing, mainly because the folio is under
> I/O, the architecture fault handler unconditionally falls back to
> retrying with mmap_lock. This leads to mmap_lock contention.
>
> This patch introduces VM_FAULT_RETRY_HARD to mark the paths that
> require mmap_lock.
Really sorry, but what a bad name :)
Can we just embed the "no VMA lock" or "MMAP_LOCK" in the name somehow?
VM_FAULT_RETRY_NEED_MMAP_LOCK
VM_FAULT_RETRY_NO_VMA_LOCK
Something like that?
Also, we should document what the new flag means, and how it, for example, is
always accompanied by VM_FAULT_RETRY.
Best to be as clear as possible on the intended semantics.
--
Cheers,
David
next prev parent reply other threads:[~2026-07-07 13:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 7:50 [RFC PATCH v3] mm: retry page faults under per-VMA lock when mmap_lock is not required Hongru Zhang
2026-07-07 13:51 ` David Hildenbrand (Arm) [this message]
2026-07-07 16:52 ` Lorenzo Stoakes
2026-07-09 8:47 ` Hongru Zhang
2026-07-10 14:54 ` Suren Baghdasaryan
2026-07-10 23:37 ` Barry Song
2026-07-11 1:54 ` Suren Baghdasaryan
2026-07-11 2:02 ` Suren Baghdasaryan
2026-07-11 4:00 ` Matthew Wilcox
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=296662bf-66b9-4343-9104-afc56309b7fb@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=baohua@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=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