linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Mike Snitzer <snitzer@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	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: Tue, 11 Nov 2025 00:44:58 -0800	[thread overview]
Message-ID: <aRL3imaw47ovSy7H@infradead.org> (raw)
In-Reply-To: <aRIH-ClvzCdoIaqz@kernel.org>

On Mon, Nov 10, 2025 at 10:42:48AM -0500, Mike Snitzer wrote:
> On Mon, Nov 10, 2025 at 01:12:33AM -0800, Christoph Hellwig wrote:
> > On Fri, Nov 07, 2025 at 05:16:27PM -0500, Mike Snitzer wrote:
> > > Those ends lend themselves to benefitting from more capable RMW
> > > if/when needed.
> > 
> > How are ends of a larger I/O inhently more benefits from cached
> > RMW then say a single tiny I/O?
> 
> Any unaligned WRITE, no matter the size of the WRITE, will benefit
> from RMW of its subpage ends if streaming unaligned WRITEs.

Yes.

> I saw below that even saying "unaligned WRITE" leaves you annoyed.

No, it doesn't.

> Every time I say stuff like "the entire reason for the patchset" I set
> myself up for a rebuttal from you.  You just did the same thing.  I'm
> going to try to be accomodating and cool but please lets dial back
> this weirdly caustic dynamic that is forming yet again.
> 
> Why is it that you cannot acknowledge that it isn't an all or nothing
> situation?

I'm actually arguing for that, not you.  You make claims of "the entire
reason", not me.


> Restating an important point underpinning my desire to handle this
> niche unaligned streaming WRITE case efficiently: it removes the one
> case I know of where NFSD_IO_DIRECT cannot compete with
> NFSD_IO_BUFFERED. Whereby making NFSD_IO_DIRECT a compelling
> alternative default IO mode.  To leave it to use DONTCACHE would be
> purposely compromising NFSD_IO_DIRECT to be less effective.
> 
> I'm also saying: there is very limited downside to using cached
> buffered for these subpage end segments.  But IF I'm proven wrong and
> they do show themselves to be a problem in the future then a code
> change will be needed.

So spell them out in a comment, and leave nuggets for future readers.
And explain why they don't apply for a single segment this is not
page aligned by either being smaller than a page or straddling two
pages.

> 
> > Also to go back to my previous mail:  How can an I/O that is aligned
> > in file offset and length, but not in the backing memory ever going
> > to benefit from this caching?
> 
> It wouldn't, because it would take the no_dio path and the entire IO
> would be issued using DONTCACHE.

Yes, I see that right now it does not.  But I want to hear from you
why you think it is worth treating different.  Because there is no
rationale that a small unaligned write won't benefit from it.  In fact
all conventional wisdom suggest it will benefit even more.  And I'm
trying to explain that for a few days now, but somehow it doesn't make
it across.

> 
> That I just had to point that out shows how absurd all this contrarian
> hand-wringing has gotten.

Can you please top these attacks?

> 
> > > Or is this something we make tunable?
> > > NFSD_IO_DIRECT_DONTCACHE_UNALIGNED?
> > 
> > Throwing in yet another tunable while not understanding the problem
> > at hand is about the worst possible outcome.
> 
> Just because you don't understand something: that isn't my failing.
> So your need to be the expert here is misplaced.  Please show you
> understand the problem before you project lack of understanding onto
> me.

Well, if you do understand it you failed to explain it, which means
there it no _collective_ understanding.  But to me this thread suggests
you don't understand it either, although I'd rather get to the bottom
of it then getting stuck on who understands what.


  reply	other threads:[~2025-11-11  8:45 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 [this message]
2025-11-10  9:17       ` Christoph Hellwig
2025-11-10 15:43         ` Mike Snitzer
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=aRL3imaw47ovSy7H@infradead.org \
    --to=hch@infradead.org \
    --cc=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=dai.ngo@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=snitzer@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).