From: Mike Snitzer <snitzer@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Chuck Lever <cel@kernel.org>, NeilBrown <neil@brown.name>,
Jeff Layton <jlayton@kernel.org>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
linux-nfs@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH v11 2/3] NFSD: Implement NFSD_IO_DIRECT for NFS WRITE
Date: Mon, 10 Nov 2025 10:43:50 -0500 [thread overview]
Message-ID: <aRIINpMezN9qw73w@kernel.org> (raw)
In-Reply-To: <aRGtn90M8ktOCOnv@infradead.org>
On Mon, Nov 10, 2025 at 01:17:19AM -0800, Christoph Hellwig wrote:
> On Fri, Nov 07, 2025 at 03:28:06PM -0500, Chuck Lever wrote:
> > +1 for an explanatory comment, but I'm not getting what is "counter-
> > intuitive" about leaving the content of the end segments in the page
> > cache. The end segments are small and simply cannot be handled by direct
> > I/O.
>
> The downside if of course extra page cache usage / pollution. If these
> segments are aligned to the file system minimum I/O size, but not to
> the memory requirements there is not going to be any RMW cycle that
> leaving them in the page cache for would be useful.
Straw man: the entire IO would be issued using DONTCACHE (due to it
being "case 2"). You too keep conflating "case 1" and "case 2":
https://lore.kernel.org/linux-nfs/20251107153422.4373-1-cel@kernel.org/T/#mca19127d102dd7d24b2e44df4d9417b2cc61b340
Your broader point of "extra page cache usage / pollution". DONTCACHE
is already using page cache, it just will hopefully drop-behind its
pages.
But for "case 1", yes if we use cached buffered IO for the subpage
ends _BUT_ the workload isn't ever going to actually need to RMW
(e.g. because it isn't part of a continuous stream of unaligned
WRITEs) then: Yes, those individual pages associated with the
unaligned ends will polute. BUT they are individual pages that MM is
quite good about handling.
> Similarly if the single segment is not aligned in the file logic space,
> chances of having another RMW come in are the same as for a large
> one with unaligned head and/or tail.
Not following you, please reword and be clearer.
next prev parent reply other threads:[~2025-11-10 15:43 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-07 15:34 [PATCH v11 0/3] NFSD: Implement NFSD_IO_DIRECT for NFS WRITE Chuck Lever
2025-11-07 15:34 ` [PATCH v11 1/3] NFSD: Make FILE_SYNC WRITEs comply with spec Chuck Lever
2025-11-07 15:34 ` [PATCH v11 2/3] NFSD: Implement NFSD_IO_DIRECT for NFS WRITE Chuck Lever
2025-11-07 15:39 ` Christoph Hellwig
2025-11-07 15:40 ` Chuck Lever
2025-11-07 20:05 ` Mike Snitzer
2025-11-07 20:08 ` Chuck Lever
2025-11-07 20:10 ` Mike Snitzer
2025-11-07 21:58 ` NeilBrown
2025-11-07 22:24 ` Mike Snitzer
2025-11-07 23:42 ` NeilBrown
2025-11-08 2:01 ` Mike Snitzer
2025-11-10 16:41 ` Chuck Lever
2025-11-10 17:57 ` Mike Snitzer
2025-11-11 8:51 ` Christoph Hellwig
2025-11-11 14:20 ` Chuck Lever
2025-11-11 14:21 ` Christoph Hellwig
2025-11-12 0:06 ` Mike Snitzer
2025-11-12 15:02 ` Christoph Hellwig
2025-11-12 23:14 ` Mike Snitzer
2025-11-13 8:13 ` Christoph Hellwig
2025-11-13 21:45 ` Mike Snitzer
2025-11-07 20:28 ` Chuck Lever
2025-11-07 22:16 ` Mike Snitzer
2025-11-10 9:12 ` Christoph Hellwig
2025-11-10 15:42 ` Mike Snitzer
2025-11-11 8:44 ` Christoph Hellwig
2025-11-10 9:17 ` Christoph Hellwig
2025-11-10 15:43 ` Mike Snitzer [this message]
2025-11-07 17:18 ` Mike Snitzer
2025-11-07 22:13 ` NeilBrown
2025-11-07 15:34 ` [PATCH v11 3/3] NFSD: add Documentation/filesystems/nfs/nfsd-io-modes.rst Chuck Lever
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=aRIINpMezN9qw73w@kernel.org \
--to=snitzer@kernel.org \
--cc=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=dai.ngo@oracle.com \
--cc=hch@infradead.org \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=tom@talpey.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.