commit 1201253bc42e75739a2edeb64973c84d2527a57c Author: Matthew Dillon <dil...@apollo.backplane.com> Date: Fri Jun 10 21:38:37 2022 -0700
kernel - namecache eviction fixes * Fix several namecache eviction issues which interfere with nlookup*() functions. There is an optimization where nlookup*() avoids locking intermediate ncp's in a path whenever possible on the assumption that the ref on the ncp will prevent eviction. This assumption fails when the machine is under a heavy namecache load. Errors included spurious ENOTCONN and EINVAL error codes from file operations. * Refactor the namecache code to not evict resolved namecache entries which have extra refs under normal operation. This allows nlookup*() and other functions to operate semi-lockless for intermediate elements in a path. However, they still obtain a ref which is a cache-unfriendly atomic operation. This fixes numerous weird errors that occur during heavy dsynth bulk builds. * Also fix a bug which evicted too many resolved namecache entries when attempting to evict unresolved entries. This should improve performance under heavy namecache loads a bit. Summary of changes: sys/kern/vfs_cache.c | 411 +++++++++++++++++++++++++++++++++++++++---------- sys/kern/vfs_nlookup.c | 67 ++++++-- sys/sys/namecache.h | 4 + 3 files changed, 388 insertions(+), 94 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1201253bc42e75739a2edeb64973c84d2527a57c -- DragonFly BSD source repository