linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@kernel.org>
To: Chuck Lever III <chuck.lever@oracle.com>
Cc: Jeff Layton <jlayton@kernel.org>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	Anna Schumaker <anna@kernel.org>,
	Trond Myklebust <trondmy@hammerspace.com>,
	Neil Brown <neilb@suse.de>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v12 00/24] nfs/nfsd: add support for localio
Date: Thu, 22 Aug 2024 11:42:54 -0400	[thread overview]
Message-ID: <Zsdcfk19yN9wK9Rm@kernel.org> (raw)
In-Reply-To: <F07C319B-2B87-4C5C-850C-4B68C57AA6D6@oracle.com>

On Thu, Aug 22, 2024 at 03:18:56PM +0000, Chuck Lever III wrote:
> 
> 
> > On Aug 21, 2024, at 10:00 PM, Mike Snitzer <snitzer@kernel.org> wrote:
> > 
> > Hey Jeff,
> > 
> > On Wed, Aug 21, 2024 at 03:20:55PM -0400, Jeff Layton wrote:
> >> 
> >> This looks much improved. I didn't see anything that stood out at me as
> >> being problematic code-wise with the design or final product, aside
> >> from a couple of minor things.
> > 
> > BTW, thanks for this feedback, much appreciated!
> > 
> >> But...this patchset is hard to review. My main gripe is that there is a
> >> lot of "churn" -- places where you add code, just to rework it in a new
> >> way in a later patch.
> >> 
> >> For instance, the nfsd_file conversion should be integrated into the
> >> new infrastructure much earlier instead of having a patch that later
> >> does that conversion. Those kinds extraneous changes make this much
> >> harder to review than it would be if this were done in a way that
> >> avoided that churn.
> > 
> > I think I've addressed all your v12 review comments from earlier
> > today.  I've pushed the new series out to my git repo here:
> > https://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git/log/?h=nfs-localio-for-next
> > 
> > No code changes, purely a bunch of rebasing to clean up like you
> > suggested.  Only outstanding thing is the nfsd tracepoints handling of
> > NULL rqstp (would like to get Chuck's expert feedback on that point).
> > 
> > Please feel free to have a look at my branch while I wait for any
> > other v12 feedback from Chuck and/or others before I send out v13.
> > I'd like to avoid spamming the list like I did in the past ;)
> 
> Was looking for an appropriate place to reply with this question,
> but didn't see one. So here goes:
> 
> One of the issues Neil mentioned was dealing with the case where
> a server file system is unexported and perhaps unmounted while
> there is LOCALIO ongoing.

Yes, that was a problem with v11 and prior because the client was
holding a reference on the nfsd_file's underlying file (nf->nf_file)
for the duration of the open (within nfs_open_ctx).  That client-side
caching of the open file was done for performance reasons, but with
client-side use of nfsd_file we can claw back ~50% of that performance
by using the filecache's GC (patch 23 in this series details the
comparative performance numbers I'm talking about).

So I removed that extra client-side reference entirely, and just rely
on nfsd's filecache to hold the file open by nfsd_file_acquire_local()
taking reference on nfsd_file (so server does the normal thing on
shutdown where it walks the filecache's hlist during shutdown).

> Can you describe what the client and application see in this
> case? Do you have test cases for this scenario?

No, I've been testing it manually:

Client is using localio for /mnt/test2:

# python3
>>> f = open("/mnt/test2/testfile", encoding = "ISO-8859-1")
>>> s = f.read(8)
>>>

Server (happens to be running in container) is shutdown:

podman exec -ti nfs_12 /bin/bash
[root@6baf567b559a /]# systemctl stop nfs-server.service
[root@6baf567b559a /]# umount /export/cvol_12_0

(even easier to test without server in a container)

> Obviously we don't want a crash or deadlock, but I would guess the
> client/app should behave just like remote NFSv3 -- there, the
> server returns ESTALE on a READ or WRITE, and read(2) or write(2)
> on the client returns EIO. Ie, behavior should be deterministic.

Yes, that is how it works: exactly like remote NFSv3.

  reply	other threads:[~2024-08-22 15:42 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19 18:17 [PATCH v12 00/24] nfs/nfsd: add support for localio Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 01/24] nfs_common: factor out nfs_errtbl and nfs_stat_to_errno Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 02/24] nfs_common: factor out nfs4_errtbl and nfs4_stat_to_errno Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 03/24] nfs: factor out {encode,decode}_opaque_fixed to nfs_xdr.h Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 04/24] nfsd: factor out __fh_verify to allow NULL rqstp to be passed Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 05/24] nfsd: fix nfsfh tracepoints to properly handle NULL rqstp Mike Snitzer
2024-08-21 17:46   ` Jeff Layton
2024-08-21 21:23     ` Mike Snitzer
2024-08-22 15:07       ` Chuck Lever
2024-08-22 16:04         ` Mike Snitzer
2024-08-22 17:07           ` Jeff Layton
2024-08-22 17:20             ` Mike Snitzer
2024-08-22 18:14               ` Chuck Lever III
2024-08-19 18:17 ` [PATCH v12 06/24] nfsd: add nfsd_file_acquire_local() Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 07/24] SUNRPC: remove call_allocate() BUG_ONs Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 08/24] SUNRPC: add rpcauth_map_clnt_to_svc_cred_local Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 09/24] nfs_common: add NFS LOCALIO auxiliary protocol enablement Mike Snitzer
2024-08-21 18:04   ` Jeff Layton
2024-08-21 18:39   ` Jeff Layton
2024-08-19 18:17 ` [PATCH v12 10/24] nfsd: add localio support Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 11/24] nfsd: implement server support for NFS_LOCALIO_PROGRAM Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 12/24] SUNRPC: replace program list with program array Mike Snitzer
2024-08-21 18:31   ` Jeff Layton
2024-08-21 20:40     ` Mike Snitzer
2024-08-21 21:43       ` Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 13/24] nfs: pass struct file to nfs_init_pgio and nfs_init_commit Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 14/24] nfs: add localio support Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 15/24] nfs: enable localio for non-pNFS IO Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 16/24] pnfs/flexfiles: enable localio support Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 17/24] nfs/localio: use dedicated workqueues for filesystem read and write Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 18/24] nfs: implement client support for NFS_LOCALIO_PROGRAM Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 19/24] nfs: add Documentation/filesystems/nfs/localio.rst Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 20/24] nfsd: use GC for nfsd_file returned by nfsd_file_acquire_local Mike Snitzer
2024-08-21 18:34   ` Jeff Layton
2024-08-19 18:17 ` [PATCH v12 21/24] nfs_common: expose localio's required nfsd symbols to nfs client Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 22/24] nfs: push localio nfsd_file_put call out to client Mike Snitzer
2024-08-21 18:50   ` Jeff Layton
2024-08-19 18:17 ` [PATCH v12 23/24] nfs: switch client to use nfsd_file for localio Mike Snitzer
2024-08-19 18:17 ` [PATCH v12 24/24] nfs: add FAQ section to Documentation/filesystems/nfs/localio.rst Mike Snitzer
2024-08-21 19:03   ` Jeff Layton
2024-08-21 20:12     ` Mike Snitzer
2024-08-21 20:14       ` Mike Snitzer
2024-08-21 23:46         ` Jeff Layton
2024-08-19 18:29 ` [PATCH v12 00/24] nfs/nfsd: add support for localio Chuck Lever III
2024-08-19 18:43   ` Mike Snitzer
2024-08-21 19:20 ` Jeff Layton
2024-08-21 20:05   ` Mike Snitzer
2024-08-22 12:35     ` Jeff Layton
2024-08-22  2:00   ` Mike Snitzer
2024-08-22 12:50     ` Jeff Layton
2024-08-22 15:18     ` Chuck Lever III
2024-08-22 15:42       ` Mike Snitzer [this message]
2024-08-21 19:56 ` Chuck Lever
2024-08-21 20:10   ` 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=Zsdcfk19yN9wK9Rm@kernel.org \
    --to=snitzer@kernel.org \
    --cc=anna@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.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;
as well as URLs for NNTP newsgroup(s).