From: Mike Snitzer <snitzer@kernel.org>
To: sashiko-reviews@lists.linux.dev,
Matthew Wilcox <willy@infradead.org>,
linux-mm@kvack.org, Chuck Lever <cel@kernel.org>
Cc: Jeff Layton <jlayton@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>,
Anna Schumaker <anna@kernel.org>,
Jonathan Flynn <jonathan.flynn@hammerspace.com>
Subject: Re: [PATCH v9 6/6] NFSD: drop a shared boundary page only once both WRITEs have written it
Date: Mon, 26 Oct 2026 02:45:42 -0400 [thread overview]
Message-ID: <at73FnE5dVNyQO_L@kernel.org> (raw)
In-Reply-To: <sashiko-outbox-184467@kernel.org>
On Sun, Oct 25, 2026 at 10:12:10PM +0000, sashiko-bot@kernel.org wrote:
> However, in fs/nfsd/vfs.c:nfsd_write_dio_iters_init(), the boundary
> between the buffered prefix or suffix and the direct middle segment is
> still cut at max_t(u32, offset_align, PAGE_SIZE):
[...]
> Should cut in nfsd_write_dio_iters_init() also take
> mapping_min_folio_nrbytes(nf->nf_file->f_mapping) into account so that
> buffered prefix and suffix segments are cut on unit boundaries?
Yes, and a separate patch already does that. "NFSD: cut a misaligned
direct-mode WRITE at folio boundaries" replaces the commit in
cel/nfsd-testing that added this cut:
https://lore.kernel.org/linux-nfs/at0DFod8CcUfus2S@kernel.org/
With it, a misaligned end is cut at
cut = max_t(unsigned long, offset_align,
mapping_min_folio_nrbytes(nf->nf_file->f_mapping));
so the buffered prefix and suffix end on a boundary of the smallest folio,
the same unit that nfsd_write_dio_seg_hold() uses. The cover letter of
v9 says that v8 1/7 went out separately. This review ran on the v9 base
(cel/nfsd-testing), which does not have that replacement yet. v9 applies
on top of the replacement without change.
An end that is already aligned to offset_align keeps no buffered segment,
mid-folio or not. This keeps such a WRITE direct, on purpose.
Mike
next prev parent reply other threads:[~2026-10-26 6:45 UTC|newest]
Thread overview: 14+ 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-25 22:12 ` sashiko-bot
2026-10-26 6:42 ` 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-25 22:12 ` sashiko-bot
2026-10-26 6:45 ` Mike Snitzer [this message]
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
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=at73FnE5dVNyQO_L@kernel.org \
--to=snitzer@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=axboe@kernel.dk \
--cc=cel@kernel.org \
--cc=corbet@lwn.net \
--cc=hch@lst.de \
--cc=jlayton@kernel.org \
--cc=jonathan.flynn@hammerspace.com \
--cc=linux-mm@kvack.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--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