From: Bruce Fields <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: still seeing single client NFS4ERR_DELAY / CB_RECALL
Date: Mon, 10 Aug 2020 15:07:29 -0400 [thread overview]
Message-ID: <20200810190729.GB13266@fieldses.org> (raw)
In-Reply-To: <227E18E8-5A45-47E3-981C-549042AFB391@oracle.com>
Thanks for the test results:
On Mon, Aug 10, 2020 at 02:21:34PM -0400, Chuck Lever wrote:
> For these results I've switched to sec=sys so the test completes faster.
>
> NFSv3/sys: 953.37user 5101.96system 14:13.78elapsed 709%CPU (0avgtext+0avgdata 107160maxresident)k
>
> NFSv4.1/sys: 953.64user 5202.27system 17:54.51elapsed 572%CPU (0avgtext+0avgdata 107204maxresident)k
>
> NFSv4.0/sys unpatched: 965.44user 5406.75system 36:10.72elapsed 293%CPU (0avgtext+0avgdata 107252maxresident)k
>
> NFSv4.0/sys with fix: 968.38user 5359.18system 30:50.38elapsed 341%CPU (0avgtext+0avgdata 107140maxresident)k
Well, that didn't work!
So maybe it's write opens that are the problem in this case. The below
should mostly revert to pre-94415b06eb8a behavior in the 4.0 case, so if
this doesn't fix it then I was wrong about the cause....
--b.
commit 0e94ee0b6f11
Author: J. Bruce Fields <bfields@redhat.com>
Date: Sun Aug 9 17:11:59 2020 -0400
nfsd4: don't grant delegations on 4.0 create opens
Chuck reported a major slowdown running the git regression suite over
NFSv4.0.
In the 4.0 case, the server has no way to identify which client most
metadata-modifying operations come from. So, for example, the common
pattern of an create or write open followed by a setattr is likely to
result in an immediate break in the 4.0 case.
It's probably not worth giving out delegations on 4.0 write or create
opens.
Reported-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index fdba971d06c3..0d51d1751592 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -5096,6 +5096,19 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open,
goto out_no_deleg;
if (!cb_up || !(oo->oo_flags & NFS4_OO_CONFIRMED))
goto out_no_deleg;
+ if (clp->cl_minorversion)
+ break;
+ /*
+ * In the absence of sessions, most operations
+ * that modify metadata (like setattr) can't
+ * be linked to the client sending them, so
+ * will result in a delegation break. That's
+ * especially likely for write and create opens:
+ */
+ if (open->op_share_access & NFS4_SHARE_ACCESS_WRITE)
+ goto out_no_deleg;
+ if (open->op_create == NFS4_OPEN_CREATE)
+ goto out_no_deleg;
break;
default:
goto out_no_deleg;
next prev parent reply other threads:[~2020-08-10 19:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-09 17:11 still seeing single client NFS4ERR_DELAY / CB_RECALL Chuck Lever
2020-08-09 20:27 ` Bruce Fields
2020-08-09 21:25 ` Bruce Fields
2020-08-10 18:21 ` Chuck Lever
2020-08-10 19:07 ` Bruce Fields [this message]
2020-08-10 20:01 ` Chuck Lever
2020-08-10 20:10 ` Bruce Fields
2020-08-11 13:31 ` Chuck Lever
2020-08-16 20:46 ` Chuck Lever
2020-08-17 22:20 ` Bruce Fields
2020-08-18 15:27 ` Chuck Lever
2020-08-18 21:26 ` Chuck Lever
2020-08-18 21:49 ` Bruce Fields
2020-08-19 13:26 ` Chuck Lever
2020-08-19 21:29 ` Bruce Fields
2020-08-20 12:56 ` Chuck Lever
2020-08-24 13:39 ` Chuck Lever
2020-08-24 14:22 ` Bruce Fields
2020-08-24 15:42 ` Chuck Lever
2020-09-04 22:01 ` Bruce Fields
2020-09-04 22:27 ` 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=20200810190729.GB13266@fieldses.org \
--to=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.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