From: Trond Myklebust <trondmy@hammerspace.com>
To: "dai.ngo@oracle.com" <dai.ngo@oracle.com>,
"anna.schumaker@oracle.com" <anna.schumaker@oracle.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v2 1/1] NFS: remove revoked delegation from server's delegation list
Date: Tue, 8 Oct 2024 23:45:38 +0000 [thread overview]
Message-ID: <441bbfab2f4f8964c3f60e2009331affbac45592.camel@hammerspace.com> (raw)
In-Reply-To: <1728428287-2031-1-git-send-email-dai.ngo@oracle.com>
On Tue, 2024-10-08 at 15:58 -0700, Dai Ngo wrote:
> After the delegation is returned to the NFS server remove it
> from the server's delegations list to reduce the time it takes
> to scan this list.
>
> Network trace captured while running the below script shows the
> time taken to service the CB_RECALL increases gradually due to
> the overhead of traversing the delegation list in
> nfs_delegation_find_inode_server.
>
> The NFS server in this test is a Solaris server which issues
> CB_RECALL when receiving the all-zero stateid in the SETATTR.
>
> mount=/mnt/data
> for i in $(seq 1 20)
> do
> echo $i
> mkdir $mount/testtarfile$i
> time tar -C $mount/testtarfile$i -xf 5000_files.tar
> done
>
> Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
> ---
> fs/nfs/delegation.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
> index 20cb2008f9e4..035ba52742a5 100644
> --- a/fs/nfs/delegation.c
> +++ b/fs/nfs/delegation.c
> @@ -1001,6 +1001,11 @@ void nfs_delegation_mark_returned(struct inode
> *inode,
> }
>
> nfs_mark_delegation_revoked(delegation);
> + clear_bit(NFS_DELEGATION_RETURNING, &delegation->flags);
> + spin_unlock(&delegation->lock);
> + if (nfs_detach_delegation(NFS_I(inode), delegation,
> NFS_SERVER(inode)))
> + nfs_put_delegation(delegation);
> + goto out_rcu_unlock;
>
> out_clear_returning:
> clear_bit(NFS_DELEGATION_RETURNING, &delegation->flags);
OK, I can fix up nfs_revoke_delegation() later. Thanks!
Reviewed-by: Trond Myklebust <trond.myklebust@hammerspace.com>
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
prev parent reply other threads:[~2024-10-08 23:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 22:58 [PATCH v2 1/1] NFS: remove revoked delegation from server's delegation list Dai Ngo
2024-10-08 23:45 ` Trond Myklebust [this message]
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=441bbfab2f4f8964c3f60e2009331affbac45592.camel@hammerspace.com \
--to=trondmy@hammerspace.com \
--cc=anna.schumaker@oracle.com \
--cc=dai.ngo@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