The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Ameer Hamza <ameer.hamza@truenas.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: cel@kernel.org, jlayton@kernel.org, neil@brown.name,
	 okorniev@redhat.com, Dai.Ngo@oracle.com, tom@talpey.com,
	trondmy@kernel.org,  anna@kernel.org, linux-nfs@vger.kernel.org,
	linux-kernel@vger.kernel.org,  alexander.motin@truenas.com,
	caleb.stjohn@truenas.com
Subject: Re: [PATCH 1/2] NFSD: Use nfsd_iter_read() when ->splice_read is not zero-copy
Date: Wed, 19 Aug 2026 04:44:14 +0500	[thread overview]
Message-ID: <aoTuAnr4bBLg-BGf@hamza-PC> (raw)
In-Reply-To: <aoRvOZTxA1kxBO9x@infradead.org>

On Tue, Aug 18, 2026 at 07:42:01AM -0700, Christoph Hellwig wrote:
> On Tue, Aug 18, 2026 at 02:08:10AM +0500, Ameer Hamza wrote:
> > For some files splicing a READ cannot avoid a copy: gfs2, kernfs
> > and the cifs direct-I/O modes use copy_splice_read() as their
> > ->splice_read, and the VFS substitutes it for DAX files.
> > copy_splice_read() allocates a fresh page for every page of
> > payload and reads into it; nfsd_splice_actor() then installs
> > those pages in rq_respages, displacing Reply pages the thread
> > already owns. Both sets of pages are then freed.
> > 
> > Route these READs through nfsd_iter_read() instead. It performs
> 
> No.  None of the above are sensible use cases for NFSD exports.
> There is no good reason to add a barely maintained special code path
> thae pokes into internals for this.
>

Yeah, agreed on the poking into internals part. I will rework it
in v2 based on Neil's FMODE suggestion unless you have something
else in mind.

  reply	other threads:[~2026-08-18 23:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 21:08 [PATCH 0/2] SUNRPC: Recycle sent Reply pages instead of freeing them Ameer Hamza
2026-08-17 21:08 ` [PATCH 1/2] NFSD: Use nfsd_iter_read() when ->splice_read is not zero-copy Ameer Hamza
2026-08-18 13:55   ` Chuck Lever
2026-08-18 23:12     ` Ameer Hamza
2026-08-18 14:42   ` Christoph Hellwig
2026-08-18 23:44     ` Ameer Hamza [this message]
2026-08-18 22:54   ` NeilBrown
2026-08-18 23:22     ` Ameer Hamza
2026-08-17 21:08 ` [PATCH 2/2] SUNRPC: Recycle sent Reply pages instead of freeing them Ameer Hamza

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=aoTuAnr4bBLg-BGf@hamza-PC \
    --to=ameer.hamza@truenas.com \
    --cc=Dai.Ngo@oracle.com \
    --cc=alexander.motin@truenas.com \
    --cc=anna@kernel.org \
    --cc=caleb.stjohn@truenas.com \
    --cc=cel@kernel.org \
    --cc=hch@infradead.org \
    --cc=jlayton@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    --cc=trondmy@kernel.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