freebsd-skq/sys
Mateusz Guzik b088a4d6f9 cache: avoid excessive relocking on entry removal during lookup
Due to lock ordering issues (bucket lock held, vnode locks wanted) the code
starts with trylocking which in face of contention often fails. Prior to
the change it would loop back with a possible yield.

Instead note we know what locks are needed and can take them in the right
order, avoiding retries. Then we can safely re-lookup and see if the entry
we are looking for is still there.

On a 104-way box poudriere would result in constant retries during an 11h
run as seen in the vfs.cache.zap_and_exit_bucket_fail counter.

before: 408866592
after :         0

However, a new stat reports:
vfs.cache.zap_and_exit_bucket_relock_success: 32638

Note this is only a bandaid over current design issues.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
2019-09-10 20:19:29 +00:00
..
amd64 Change synchonization rules for vm_page reference counting. 2019-09-09 21:32:42 +00:00
arm Change synchonization rules for vm_page reference counting. 2019-09-09 21:32:42 +00:00
arm64 Change synchonization rules for vm_page reference counting. 2019-09-09 21:32:42 +00:00
bsm
cam Supply SAT layer with valid transfer sizes. 2019-09-07 15:56:00 +00:00
cddl Replace redundant code with a few new vm_page_grab facilities: 2019-09-10 19:08:01 +00:00
compat Replace redundant code with a few new vm_page_grab facilities: 2019-09-10 19:08:01 +00:00
conf riscv: Ensure that BSS is 8-byte aligned 2019-09-09 15:57:24 +00:00
contrib Change synchonization rules for vm_page reference counting. 2019-09-09 21:32:42 +00:00
crypto Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
ddb ddb(4): Add some support for lexing IPv6 addresses 2019-09-09 16:32:23 +00:00
dev Replace redundant code with a few new vm_page_grab facilities: 2019-09-10 19:08:01 +00:00
dts dtso: allwinner: Add an overlay for H3 thermal node 2019-08-24 13:26:34 +00:00
fs Change synchonization rules for vm_page reference counting. 2019-09-09 21:32:42 +00:00
gdb gdb(4): Root a sysctl tree at 'debug.gdb.' 2019-09-08 22:52:47 +00:00
geom Allow more nesting of GEOM partitioning schemes 2019-09-03 20:57:20 +00:00
gnu arm: dts: am33xx: Fix the region for uart0 2019-08-07 13:11:53 +00:00
i386 Change synchonization rules for vm_page reference counting. 2019-09-09 21:32:42 +00:00
isa
kern cache: avoid excessive relocking on entry removal during lookup 2019-09-10 20:19:29 +00:00
kgssapi Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
libkern Remove zlib 1.0.4 from kernel. 2019-08-25 17:13:00 +00:00
mips Change synchonization rules for vm_page reference counting. 2019-09-09 21:32:42 +00:00
modules Add kernel-side support for in-kernel TLS. 2019-08-27 00:01:56 +00:00
net Callout drain does not have to be followed by a callout stop call. 2019-09-10 14:33:07 +00:00
net80211 Enhance the comment ieee80211_add_channel() to avoid a 2019-06-10 14:31:18 +00:00
netgraph avoid holding PCB mutex during copyin/copyout() 2019-08-30 16:35:31 +00:00
netinet Only update SACK/DSACK lists when a non-empty segment was received. 2019-09-09 16:07:47 +00:00
netinet6 Add kernel-side support for in-kernel TLS. 2019-08-27 00:01:56 +00:00
netipsec Fix broken window replay check that will allow old packet to be accepted. 2019-09-06 14:30:23 +00:00
netpfil Fix rule truncation on external action module unloading. 2019-08-15 13:44:33 +00:00
netsmb Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
nfs
nfsclient
nfsserver
nlm
ofed OFED: Fix accidental double-copy of rdma_sdp.h in r351176 2019-08-18 04:19:41 +00:00
opencrypto Adjust the deprecated warnings for /dev/crypto to be less noisy. 2019-08-27 21:29:37 +00:00
powerpc Change synchonization rules for vm_page reference counting. 2019-09-09 21:32:42 +00:00
riscv Change synchonization rules for vm_page reference counting. 2019-09-09 21:32:42 +00:00
rpc Avoid relying on header pollution from sys/refcount.h. 2019-07-29 20:26:01 +00:00
security vm_map_simplify_entry considers merging an entry with its two 2019-08-25 07:06:51 +00:00
sparc64 Change synchonization rules for vm_page reference counting. 2019-09-09 21:32:42 +00:00
sys Add R_PPC_IRELATIVE relocation 2019-09-10 16:16:05 +00:00
teken Adjust teken to allow build as part of loader 2019-09-05 18:07:40 +00:00
tests
tools Add SDIO support. 2019-06-08 16:26:56 +00:00
ufs Remove some unneeded vfs_busy() calls in SU code. 2019-09-09 11:22:38 +00:00
vm Replace redundant code with a few new vm_page_grab facilities: 2019-09-10 19:08:01 +00:00
x86 Move phys_avail definition into MI code. It is consumed in the MI layer and 2019-08-16 00:45:14 +00:00
xdr
xen
Makefile