freebsd-src/sys/fs
Mateusz Guzik 1fccb43c39 vfs: change si_usecount management to count used vnodes
Currently si_usecount is effectively a sum of usecounts from all associated
vnodes. This is maintained by special-casing for VCHR every time usecount is
modified. Apart from complicating the code a little bit, it has a scalability
impact since it forces a read from a cacheline shared with said count.

There are no consumers of the feature in the ports tree. In head there are only
2: revoke and devfs_close. Both can get away with a weaker requirement than the
exact usecount, namely just the count of active vnodes. Changing the meaning to
the latter means we only need to modify it on 0<->1 transitions, avoiding the
check plenty of times (and entirely in something like vrefact).

Reviewed by:	kib, jeff
Tested by:	pho
Differential Revision:	https://reviews.freebsd.org/D22202
2019-11-20 12:05:59 +00:00
..
autofs Ensure that directory entry padding bytes are zeroed. 2018-11-23 22:24:59 +00:00
cd9660 cd9660: Remove redundant brelse() after r294954 2019-09-06 08:07:36 +00:00
cuse Free all allocated unit IDs in cuse(3) after the client character 2019-06-25 11:46:01 +00:00
deadfs Switch to use shared vnode locks for text files during image activation. 2019-05-05 11:20:43 +00:00
devfs vfs: change si_usecount management to count used vnodes 2019-11-20 12:05:59 +00:00
ext2fs ext2fs: Remove redundant brelse() after r294954 2019-09-06 08:07:12 +00:00
fdescfs Ensure that directory entry padding bytes are zeroed. 2018-11-23 22:24:59 +00:00
fifofs fcntl: fix overflow when setting F_READAHEAD 2019-06-20 23:07:20 +00:00
fuse Fix an off-by-one error from r351961 2019-09-16 16:41:01 +00:00
msdosfs Plug the rest of undef behavior places that were missed in r337456. 2019-10-11 18:37:02 +00:00
nfs Fix interface between nfsclient and vnode pager. 2019-10-22 16:17:38 +00:00
nfsclient Replace OBJ_MIGHTBEDIRTY with a system using atomics. Remove the TMPFS_DIRTY 2019-10-29 21:06:34 +00:00
nfsserver Replace OBJ_MIGHTBEDIRTY with a system using atomics. Remove the TMPFS_DIRTY 2019-10-29 21:06:34 +00:00
nullfs nullfs: use MNTK_NOMSYNC 2019-10-13 15:42:04 +00:00
procfs Define macro VM_MAP_ENTRY_FOREACH for enumerating the entries in a vm_map. 2019-10-08 07:14:21 +00:00
pseudofs pseudofs: hashed vncache 2019-10-22 22:52:53 +00:00
smbfs (4/6) Protect page valid with the busy lock. 2019-10-15 03:45:41 +00:00
tmpfs Simplify anonymous memory handling with an OBJ_ANON flag. This eliminates 2019-11-19 23:19:43 +00:00
udf Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
unionfs vfs: add VOP_NEED_INACTIVE 2019-08-28 20:34:24 +00:00