freebsd-nq/sys
Rick Macklem 5e5ca4c8fc nfscl: Add a "has acquired a delegation" flag for delegations
A problem was reported via email, where a large (130000+) accumulation
of NFSv4 opens on an NFSv4 mount caused significant lock contention
on the mutex used to protect the client mount's open/lock state.
Although the root cause for the accumulation of opens was not
resolved, it is obvious that the NFSv4 client is not designed to
handle 100000+ opens efficiently.

For a common case where delegations are not being issued by the
NFSv4 server, the code acquires the mutex lock for open/lock state,
finds the delegation list empty and just unlocks the mutex and returns.
This patch adds an NFS mount point flag that is set when a delegation
is issued for the mount.  Then the patched code checks for this flag
before acquiring the open/lock mutex, avoiding the need to acquire
the lock for the case where delegations are not being issued by the
NFSv4 server.
This change appears to be performance neutral for a small number
of opens, but should reduce lock contention for a large number of opens
for the common case where server is not issuing delegations.

This commit should not affect the high level semantics of delegation
handling.

MFC after:      2 weeks
2021-06-09 08:00:43 -07:00
..
amd64 linux: make sure to zero the l_siginfo structure for ptrace(2) 2021-06-08 10:18:29 +01:00
arm arm: Remove last_fault_code 2021-06-06 16:44:47 -04:00
arm64 rk3328_cru: fix a typo in the SCLK_I2S2 gate definition 2021-06-09 12:41:52 +03:00
bsm
cam cam_sim: style: sort includes 2021-05-25 09:56:56 -06:00
cddl
compat linux: implement statx(2) 2021-06-08 10:08:56 +01:00
conf Add ofw interface support to PCI 2021-06-08 17:52:02 +02:00
contrib zfs: merge openzfs/zfs@75b4cbf62 (master) into main 2021-06-08 16:52:44 +02:00
crypto ossl: Use crypto_cursor_segment(). 2021-05-25 16:59:19 -07:00
ddb fix style nit: space after if 2021-05-05 15:26:09 -06:00
dev Add ofw interface support to PCI 2021-06-08 17:52:02 +02:00
dts arm64: rockchip: Add some DTSO to disable sd/mmc 2021-05-13 18:15:31 +02:00
fs nfscl: Add a "has acquired a delegation" flag for delegations 2021-06-09 08:00:43 -07:00
gdb
geom gconcat: Add new lock to allow modifications to the disk list in preparation for online append 2021-06-02 15:59:25 -06:00
gnu
i386 i386: Add "options HYPERV" to NOTES 2021-06-09 09:01:22 -04:00
isa
kern Fix copyright, remove "all rights reserved". 2021-06-08 08:18:00 +03:00
kgssapi
libkern Use '.arch_extension crc' in the arm64 crc32 code 2021-05-06 07:42:35 +00:00
mips [mips/broadcom] set sysctl "hw.model" by SoC ChipCommon ID 2021-05-28 23:35:37 +03:00
modules zfs: merge openzfs/zfs@75b4cbf62 (master) into main 2021-06-08 16:52:44 +02:00
net Make LINT NOINET and NOIP kernel builds warning free. 2021-06-06 14:03:06 +00:00
net80211 net80211/LinuxKPI: add more radiotap definitions 2021-06-05 16:21:49 +00:00
netgraph Make LINT NOINET and NOIP kernel builds warning free. 2021-06-06 14:03:06 +00:00
netinet tcp: A better fix for the previously attempted fix of the ack-war issue with tcp. 2021-06-04 05:26:43 -04:00
netinet6 Enter the net epoch before calling ip6_setpktopts 2021-06-04 13:18:11 -04:00
netipsec Add missing sockaddr length and family validation to various protocols 2021-05-03 13:35:19 -04:00
netpfil dummynet: free(NULL, M_DUMMYNET); is safe 2021-06-03 09:02:53 +02:00
netsmb netsmb: Avoid a read-after-free in smb_t2_request_int() 2021-05-26 10:45:40 -04:00
nfs
nfsclient
nfsserver
nlm
ofed OFED: migrate LinuxKPI net_device/ifnet macros into ofed 2021-05-27 12:26:01 +00:00
opencrypto cryptosoft: Use crypto_cursor_segment(). 2021-05-25 16:59:19 -07:00
powerpc powerpc64le/pmap: Fix superpage promotions 2021-06-05 21:49:42 -05:00
riscv riscv: Rename pmap_fault_fixup() to pmap_fault() 2021-06-06 16:44:46 -04:00
rpc nfsd: Fix the failure return for non-fh NFSv4 operations 2021-06-02 15:28:07 -07:00
security
sys linuxkpi: Include pr_err_once() in printk.h 2021-06-07 15:53:24 -07:00
teken
tests Revise FIB lookups per second benchmarking routines. 2021-05-05 12:28:17 +02:00
tools makesyscalls.lua: improve generated file style(9) compliance 2021-05-13 13:59:25 -04:00
ufs ffs: Correct the input size check in sysctl_ffs_fsck() 2021-05-31 18:59:18 -04:00
vm vm: add another pager private flag 2021-05-15 20:47:29 +00:00
x86 Disable x2APIC for SandyBridge laptops with Samsung BIOS 2021-06-03 22:47:31 +03:00
xdr
xen x86/xen: remove PVHv1 code 2021-05-17 11:41:21 +02:00
Makefile