From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Dai Ngo <dai.ngo@oracle.com>,
Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna.schumaker@oracle.com>,
Sasha Levin <sashal@kernel.org>,
trondmy@kernel.org, anna@kernel.org, linux-nfs@vger.kernel.org
Subject: [PATCH AUTOSEL 6.11 19/20] NFS: remove revoked delegation from server's delegation list
Date: Sun, 13 Oct 2024 23:57:21 -0400 [thread overview]
Message-ID: <20241014035731.2246632-19-sashal@kernel.org> (raw)
In-Reply-To: <20241014035731.2246632-1-sashal@kernel.org>
From: Dai Ngo <dai.ngo@oracle.com>
[ Upstream commit 7ef60108069b7e3cc66432304e1dd197d5c0a9b5 ]
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>
Reviewed-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/nfs/delegation.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 20cb2008f9e46..035ba52742a50 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);
--
2.43.0
next prev parent reply other threads:[~2024-10-14 3:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 3:57 [PATCH AUTOSEL 6.11 01/20] ntfs3: Add bounds checking to mi_enum_attr() Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 02/20] fs/ntfs3: Check if more than chunk-size bytes are written Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 03/20] fs/ntfs3: Fix warning possible deadlock in ntfs_set_state Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 04/20] fs/ntfs3: Stale inode instead of bad Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 05/20] fs/ntfs3: Add rough attr alloc_size check Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 06/20] fs/ntfs3: Fix possible deadlock in mi_read Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 07/20] fs/ntfs3: Additional check in ni_clear() Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 08/20] fs/ntfs3: Fix general protection fault in run_is_mapped_full Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 09/20] fs/ntfs3: Additional check in ntfs_file_release Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 10/20] rust: device: change the from_raw() function Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 11/20] scsi: scsi_transport_fc: Allow setting rport state to current state Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 12/20] cifs: Improve creating native symlinks pointing to directory Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 13/20] cifs: Fix creating native symlinks pointing to current or parent directory Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 14/20] ACPI: resource: Fold Asus Vivobook Pro N6506M* DMI quirks together Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 15/20] powercap: intel_rapl_msr: Add PL4 support for Arrowlake-U Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 16/20] thermal: intel: int340x: processor: Remove MMIO RAPL CPU hotplug support Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 17/20] thermal: intel: int340x: processor: Add MMIO RAPL PL4 support Sasha Levin
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 18/20] net: amd: mvme147: Fix probe banner message Sasha Levin
2024-10-14 3:57 ` Sasha Levin [this message]
2024-10-14 3:57 ` [PATCH AUTOSEL 6.11 20/20] misc: sgi-gru: Don't disable preemption in GRU driver Sasha Levin
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=20241014035731.2246632-19-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=anna.schumaker@oracle.com \
--cc=anna@kernel.org \
--cc=dai.ngo@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=trond.myklebust@hammerspace.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
all inboxes | Powered by JetHome®