public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@kernel.org>
To: NeilBrown <neilb@suse.de>
Cc: linux-nfs@vger.kernel.org, Anna Schumaker <anna@kernel.org>,
	Trond Myklebust <trondmy@hammerspace.com>,
	Chuck Lever <chuck.lever@oracle.com>,
	Jeff Layton <jlayton@kernel.org>
Subject: Re: [for-6.13 PATCH 05/19] nfs/localio: remove extra indirect nfs_to call to check {read,write}_iter
Date: Mon, 11 Nov 2024 10:09:10 -0500	[thread overview]
Message-ID: <ZzIeFtt60egY1Svo@kernel.org> (raw)
In-Reply-To: <173128801252.1734440.2215679616952985988@noble.neil.brown.name>

On Mon, Nov 11, 2024 at 12:20:12PM +1100, NeilBrown wrote:
> On Sat, 09 Nov 2024, Mike Snitzer wrote:
> > Push the read_iter and write_iter availability checks down to
> > nfs_do_local_read and nfs_do_local_write respectively.
> > 
> > This eliminates a redundant nfs_to->nfsd_file_file() call.
> 
> Do it?

It does.. it is harder to see just from looking at the patch.

> The patch removes 2 of these calls and add 2 of these calls.  So it
> isn't clear what is being eliminated.
> 
> Maybe it is a good thing to do, but it isn't obvious to me why.

nfs_local_doio() is common to both read and write, and both
nfs_do_local_read() and nfs_do_local_write() already call
nfs_to->nfsd_file_file(). This patch simply pushes nfs_local_doio()'s
nfs_to->nfsd_file_file() call down to nfs_do_local_{read,write} (or
put differently: moves their respective calls earlier) to kill 2 birds
with 1 stone.  Hence it eliminates an extra call to
nfs_to->nfsd_file_file() in both read and write paths.

Mike

  reply	other threads:[~2024-11-11 15:09 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 23:39 [for-6.13 PATCH 00/19] nfs/nfsd: fixes and improvements for LOCALIO Mike Snitzer
2024-11-08 23:39 ` [for-6.13 PATCH 01/19] nfs/localio: must clear res.replen in nfs_local_read_done Mike Snitzer
2024-11-11  0:36   ` NeilBrown
2024-11-08 23:39 ` [for-6.13 PATCH 02/19] nfs_common: must not hold RCU while calling nfsd_file_put_local Mike Snitzer
2024-11-11  1:01   ` NeilBrown
2024-11-13 14:58   ` Jeff Layton
2024-11-13 16:51     ` Mike Snitzer
2024-11-08 23:39 ` [for-6.13 PATCH 03/19] nfs/localio: remove redundant suid/sgid handling Mike Snitzer
2024-11-11  1:09   ` NeilBrown
2024-11-08 23:39 ` [for-6.13 PATCH 04/19] nfs/localio: eliminate unnecessary kref in nfs_local_fsync_ctx Mike Snitzer
2024-11-11  1:15   ` NeilBrown
2024-11-08 23:39 ` [for-6.13 PATCH 05/19] nfs/localio: remove extra indirect nfs_to call to check {read,write}_iter Mike Snitzer
2024-11-11  1:20   ` NeilBrown
2024-11-11 15:09     ` Mike Snitzer [this message]
2024-11-08 23:39 ` [for-6.13 PATCH 06/19] nfs/localio: eliminate need for nfs_local_fsync_work forward declaration Mike Snitzer
2024-11-11  1:21   ` NeilBrown
2024-11-08 23:39 ` [for-6.13 PATCH 07/19] nfs/localio: add direct IO enablement with sync and async IO support Mike Snitzer
2024-11-11  1:31   ` NeilBrown
2024-11-12 14:31   ` Chuck Lever
2024-11-08 23:39 ` [for-6.13 PATCH 08/19] nfsd: add nfsd_file_{get,put} to 'nfs_to' nfsd_localio_operations Mike Snitzer
2024-11-08 23:39 ` [for-6.13 PATCH 09/19] nfs_common: rename functions that invalidate LOCALIO nfs_clients Mike Snitzer
2024-11-11  1:32   ` NeilBrown
2024-11-08 23:39 ` [for-6.13 PATCH 10/19] nfs_common: move localio_lock to new lock member of nfs_uuid_t Mike Snitzer
2024-11-11  1:55   ` NeilBrown
2024-11-11 15:33     ` Mike Snitzer
2024-11-11 20:35       ` NeilBrown
2024-11-11 22:27         ` Mike Snitzer
2024-11-11 23:23           ` NeilBrown
2024-11-12  0:16             ` Mike Snitzer
2024-11-12  0:49               ` NeilBrown
2024-11-12 14:36                 ` Chuck Lever
2024-11-12 23:13                   ` NeilBrown
2024-11-13  0:07                     ` Chuck Lever III
2024-11-13  0:32                       ` NeilBrown
2024-11-08 23:39 ` [for-6.13 PATCH 11/19] nfs: cache all open LOCALIO nfsd_file(s) in client Mike Snitzer
2024-11-08 23:39 ` [for-6.13 PATCH 12/19] nfsd: update percpu_ref to manage references on nfsd_net Mike Snitzer
2024-11-08 23:39 ` [for-6.13 PATCH 13/19] nfsd: rename nfsd_serv_ prefixed methods and variables with nfsd_net_ Mike Snitzer
2024-11-08 23:39 ` [for-6.13 PATCH 14/19] nfsd: nfsd_file_acquire_local no longer returns GC'd nfsd_file Mike Snitzer
2024-11-08 23:39 ` [for-6.13 PATCH 15/19] nfs_common: rename nfslocalio nfs_uuid_lock to nfs_uuids_lock Mike Snitzer
2024-11-08 23:39 ` [for-6.13 PATCH 16/19] nfs_common: track all open nfsd_files per LOCALIO nfs_client Mike Snitzer
2024-11-08 23:40 ` [for-6.13 PATCH 17/19] nfs_common: add nfs_localio trace events Mike Snitzer
2024-11-08 23:40 ` [for-6.13 PATCH 18/19] nfs: probe for LOCALIO when v4 client reconnects to server Mike Snitzer
2024-11-08 23:40 ` [for-6.13 PATCH 19/19] nfs: probe for LOCALIO when v3 " Mike Snitzer
2024-11-11  3:06   ` NeilBrown
2024-11-10 15:49 ` [for-6.13 PATCH 00/19] nfs/nfsd: fixes and improvements for LOCALIO Chuck Lever III

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=ZzIeFtt60egY1Svo@kernel.org \
    --to=snitzer@kernel.org \
    --cc=anna@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=trondmy@hammerspace.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