FreeBSD/src 2e310f6 (r353904)sys/fs/pseudofs pseudofs_vncache.c pseudofs_internal.h

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
DeltaFile
+82-54sys/fs/pseudofs/pseudofs_vncache.c
+1-2sys/fs/pseudofs/pseudofs_internal.h
+83-562 files

UnifiedSplitRaw