freebsd-skq/sys
Rick Macklem 724072ab1d nfscl: Use hash lists to improve expected search performance for opens
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.  When searching for an open,
usually for a match by file handle, a linear search of all opens
is done.

Commit 3f7e14ad93 added a hash table of lists hashed on file handle
for the opens.  This patch uses the hash lists for searching for
a matching open based of file handle instead of an exhaustive
linear search of all opens.
This change appears to be performance neutral for a small number
of opens, but should improve expected performance for a large
number of opens.  This patch also moves any found match to the front
of the hash list, to try and maintain the hash lists in recently
used ordering (least recently used at the end of the list).

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

MFC after:	2 weeks
2021-05-25 14:19:29 -07:00
..
amd64 amd64: clear PSL.AC in the right frame 2021-05-25 18:20:46 +03:00
arm arm: RPI-B: Add ext_resources driver 2021-05-24 12:53:00 +02:00
arm64 arm64, riscv: remove reference to fsu_intr_fault 2021-05-25 12:26:52 -03:00
bsm
cam cam_sim: style: sort includes 2021-05-25 09:56:56 -06:00
cddl fbt: Remove some handling for multiple CTF containers 2021-04-02 17:49:13 -04:00
compat LinuxKPI: add addrconf_addr_solict_mult() 2021-05-25 18:01:49 +00:00
conf mmc: Only build mmc_fdt_helper and mmc_pwrseq for arch that uses ext_resources 2021-05-21 19:35:20 +02:00
contrib ipfilter: Fix ip_nat memory leak and use-after-free 2021-05-25 11:58:14 -07:00
crypto ossl: Don't encryt/decrypt too much data for chacha20. 2021-04-01 15:49:07 -07:00
ddb fix style nit: space after if 2021-05-05 15:26:09 -06:00
dev cxgbe(4): Overhaul CLIP (Compressed Local IPv6) table management. 2021-05-23 16:07:29 -07:00
dts arm64: rockchip: Add some DTSO to disable sd/mmc 2021-05-13 18:15:31 +02:00
fs nfscl: Use hash lists to improve expected search performance for opens 2021-05-25 14:19:29 -07:00
gdb gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
geom gmultipath: make physpath distinct from the underlying providers' 2021-05-06 12:32:27 -06:00
gnu
i386 sys/*/conf/*, docs: fix links to handbook 2021-05-20 09:27:10 +01:00
isa Remove more remnants of sio(4) 2021-04-07 14:33:02 -04:00
kern Clean up some of the core dumping code. 2021-05-25 16:30:32 +01:00
kgssapi
libkern Use '.arch_extension crc' in the arm64 crc32 code 2021-05-06 07:42:35 +00:00
mips [ar71xx] During reset, don't spin, just keep trying 2021-05-22 15:53:00 -07:00
modules modules: Only build sdhci_fdt for arm and arm64 2021-05-13 20:23:59 +02:00
net pf: Track the original kif for floating states 2021-05-20 12:49:27 +02:00
net80211 net80211: prefix get_random_bytes() with net80211_ 2021-03-24 22:16:09 +00:00
netgraph Fix packet cbs/ebs conversion. 2021-05-19 11:04:08 -04:00
netinet tcp: enter network epoch when calling tfb_tcp_fb_fini 2021-05-25 13:45:37 -04:00
netinet6 Fix mbuf leaks in various pru_send implementations 2021-05-12 13:00:09 -04:00
netipsec Add missing sockaddr length and family validation to various protocols 2021-05-03 13:35:19 -04:00
netpfil pf: fix ioctl() memory leak 2021-05-24 15:56:24 +02:00
netsmb
nfs Fix panic when using BOOTP to resolve root path. 2021-03-28 14:02:40 -05:00
nfsclient nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nfsserver nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nlm
ofed Add missing sockaddr length and family validation to various protocols 2021-05-03 13:35:19 -04:00
opencrypto cryptodev: Fix some input validation bugs 2021-05-11 17:36:12 -04:00
powerpc cam: clear on-stack CCBs in last few drivers 2021-05-21 08:53:59 +01:00
riscv arm64, riscv: remove reference to fsu_intr_fault 2021-05-25 12:26:52 -03:00
rpc nfsd: fix a NFSv4.1 Linux client mount stuck in CLOSE_WAIT 2021-04-27 15:32:35 -07:00
security tcp_input/syncache: acquire only read lock on PCB for SYN,!ACK packets 2021-04-12 08:25:31 -07:00
sys Bump __FreeBSD_version to 1400015 for LinuxKPI changes. 2021-05-25 18:01:49 +00: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 Move mnt_maxsymlinklen into appropriate fs mount data structures 2021-05-22 15:16:09 +03:00
vm vm: add another pager private flag 2021-05-15 20:47:29 +00:00
x86 x86/xen: further PVHv1 removal cleanup 2021-05-18 10:43:31 +02:00
xdr
xen x86/xen: remove PVHv1 code 2021-05-17 11:41:21 +02:00
Makefile