freebsd-skq/sys/fs/pseudofs
mjg 68e6247c20 pseudofs: hashed vncache
Vast majority of uses the cache are just checking if there is an entry
present on process exit (and evicting it if so). Both checking and
eviction process are very expensive and put the lock protecting it high
up on the profile during poudriere -j 104.

Convert the linked list into a hash. This allows to almost always avoid
taking the lock in the first place (and consequently almost removes it
from the profile). Note only one lock is preserved as a split did not
meaningfully impact contention.

Should the cache be used for something it will still run into contention
issues. The code needs a rewrite, but should someone want to tidy it up
further the following can be done:

1) per-chain locks (or at least an array)
2) hashing by something else than just pid

Sponsored by:	The FreeBSD Foundation
2019-10-22 22:52:53 +00:00
..
pseudofs_fileno.c sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
pseudofs_internal.h pseudofs: hashed vncache 2019-10-22 22:52:53 +00:00
pseudofs_vncache.c pseudofs: hashed vncache 2019-10-22 22:52:53 +00:00
pseudofs_vnops.c pseudofs: make readdir work without a pid again 2019-09-04 14:20:39 +00:00
pseudofs.c pseudofs: use MNTK_NOMSYNC 2019-10-13 15:42:25 +00:00
pseudofs.h Make pseudofs(9) create directory entries in order, instead 2019-09-14 19:16:07 +00:00