From: Mike Snitzer <snitzer@kernel.org>
To: Chuck Lever <cel@kernel.org>, Jeff Layton <jlayton@kernel.org>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
linux-nfs@vger.kernel.org, NeilBrown <neil@brown.name>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
Jonathan Corbet <corbet@lwn.net>
Subject: Re: [PATCH v9 0/6] mm, iomap, NFSD: stop uncached writes reading back shared pages
Date: Wed, 28 Oct 2026 01:12:55 -0400 [thread overview]
Message-ID: <auGEV03MkzR2W85B@kernel.org> (raw)
In-Reply-To: <70ef3172-9631-4e19-9b8e-4722427a5a83@app.fastmail.com>
On Tue, Oct 27, 2026 at 11:36:44AM -0400, Chuck Lever wrote:
>
>
> On Tue, Oct 27, 2026, at 10:31 AM, Jeff Layton wrote:
> > On Sat, 2026-10-24 at 18:11 -0400, Mike Snitzer wrote:
> >> Hi,
> >>
> >> Please consider this v9 for the v7.5 development cycle, so that it can
> >> go upstream in the v7.5 merge window.
> >>
> >> An uncached (RWF_DONTCACHE) buffered write drops each page it writes
> >> once that page is written back. A page the write covers only partly is
> >> shared with the neighbouring write. Once the first of the two is
> >> written back, the second reads the page back from disk before it writes
> >> its part. 32 threads wrote interleaved records to one file on
> >> XFS (emulated 4Kn NVMe, 4 KiB pages). Before and after 4/6:
> >>
> >> record pwritev2() flags 4 KiB device MiB/s
> >> bytes reads per write
> >> before after before after
> >> 47008 RWF_DONTCACHE 0.97 0.0005 831 2281
> >> 47008 RWF_DONTCACHE|RWF_DSYNC 0.99 0.0005 601 1227
> >> 6000 RWF_DONTCACHE 0.97 0.0001 121 488
> >> 6000 RWF_DONTCACHE|RWF_DSYNC 0.99 0.0002 90 206
> >>
> >> What is left after is metadata. 49152-byte records cover only whole
> >> pages, and they read 0.0005 per write either way. The test program and
> >> script that produced this table, and how to run them, are in:
> >> https://lore.kernel.org/linux-nfs/atqJBS8MlYfeUU-t@kernel.org/
> >>
> >> 4/6 has the page cache keep such a page for the write that completes
> >> it. 5/6 lets a writer that syncs its own write complete those pages
> >> itself once the sync is done. NFSD does that for a stable WRITE. 6/6
> >> is the NFSD change that uses it. 2/6 reports the DONTCACHE dirty count
> >> in the bdi debugfs stats. 3/6 adds folio_mark_dropbehind(), which 4/6
> >> and 5/6 use.
<snip>
> >
> > This all looks good to me at this point. This is a mixed mm and nfsd
> > set though. How do you envision this being merged?
> >
> > Reviewed-by: Jeff Layton <jlayton@kernel.org>
Thanks for the review Jeff
> My recommendation was take all of this through the MM tree, since
> the NFSD patch looks like the first consumer of the work, and it
> depends on how the MM API is changed during review.
Chuck, I agree, the mm changes would certainly do well to go through
the mm tree. But the 6/6 NFSD patch that makes use of the preceding
mm dontcache interface changes requires 4 of the 6 prerequisite
changes to NFSD DIRECT that have have staged in cel/nfsd-testing.
So I think we might need a post-merge NFSD tree for 7.5 that applies
the 6/6 NFSD change ontop of the changes that would land through mm.
Willy, I would like to work with you (and others in mm if they are
interested), Jeff and Chuck between now and April 2027 to see these
changes accepted for the 7.5 merge window. And if that were to happen
I cannot wait to celebrate with all of you at LSF/MM in Portugal!
Thanks,
Mike
prev parent reply other threads:[~2026-10-28 5:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 22:11 [PATCH v9 0/6] mm, iomap, NFSD: stop uncached writes reading back shared pages Mike Snitzer
2026-10-24 22:11 ` [PATCH v9 1/6] mm: take a folio off WB_DONTCACHE_DIRTY only if it was counted there Mike Snitzer
2026-10-24 22:11 ` [PATCH v9 2/6] mm: expose WB_DONTCACHE_DIRTY in bdi debugfs stats Mike Snitzer
2026-10-24 22:11 ` [PATCH v9 3/6] mm: add folio_mark_dropbehind() to mark a folio dropbehind and account it Mike Snitzer
2026-10-24 22:11 ` [PATCH v9 4/6] mm, iomap: keep a partly covered page until an uncached write completes it Mike Snitzer
2026-10-24 22:11 ` [PATCH v9 5/6] mm, iomap: let an uncached writer complete its shared pages itself Mike Snitzer
2026-10-24 22:11 ` [PATCH v9 6/6] NFSD: drop a shared boundary page only once both WRITEs have written it Mike Snitzer
2026-10-27 14:31 ` [PATCH v9 0/6] mm, iomap, NFSD: stop uncached writes reading back shared pages Jeff Layton
2026-10-27 15:36 ` Chuck Lever
2026-10-28 5:12 ` Mike Snitzer [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=auGEV03MkzR2W85B@kernel.org \
--to=snitzer@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=axboe@kernel.dk \
--cc=cel@kernel.org \
--cc=corbet@lwn.net \
--cc=hch@lst.de \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
--cc=willy@infradead.org \
/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