From: Matthew Wilcox <willy@infradead.org>
To: Wenjie Qi <qwjhust@gmail.com>
Cc: jack@suse.cz, akpm@linux-foundation.org,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, baohua@kernel.org, axboe@kernel.dk,
trond.myklebust@hammerspace.com, tz2294@columbia.edu,
chao@kernel.org, qiwenjie@xiaomi.com
Subject: Re: [PATCH] mm: filemap: skip dropbehind folios during fault-around
Date: Sun, 30 Aug 2026 13:40:17 +0100 [thread overview]
Message-ID: <apQksVlTvJY_0aTi@casper.infradead.org> (raw)
In-Reply-To: <4a4ac0b4accb50641f504f205663435047c4b26e.1788086386.git.qiwenjie@xiaomi.com>
On Sun, Aug 30, 2026 at 07:48:45PM +0800, Wenjie Qi wrote:
> From: Wenjie Qi <qiwenjie@xiaomi.com>
>
> filemap_map_pages() maps uptodate folios speculatively without going
> through the normal filemap lookup that clears dropbehind. As a result,
> a neighboring dropbehind folio can acquire a PTE and the mapped-folio
> completion guard will retain it even if that PTE is never accessed.
>
> Skip still-dropbehind folios in next_uptodate_folio(). If the skipped
> folio covers the fault address, do_read_fault() falls back to
> filemap_fault(), where the normal lookup clears dropbehind and updates
> WB_DONTCACHE_DIRTY accounting before mapping it. Speculative neighbors
> remain unmapped and can be discarded when I/O completes. Normal folios
> continue to use fault-around.
>
> Dropbehind is folio-wide, so a fault into any subpage retains the whole
> large folio through the normal fault path.
I don't think we should do this. Even if a folio is brought in through
fault-around, it still indicates some conflict between dropbehind and
another user, which indicates that the dropbehind hint was wrong.
prev parent reply other threads:[~2026-08-30 12:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 11:48 Wenjie Qi
2026-08-30 12:40 ` Matthew Wilcox [this message]
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=apQksVlTvJY_0aTi@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=baohua@kernel.org \
--cc=chao@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=qiwenjie@xiaomi.com \
--cc=qwjhust@gmail.com \
--cc=trond.myklebust@hammerspace.com \
--cc=tz2294@columbia.edu \
/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
all inboxes | Powered by JetHome®