git: DragonFly_RELEASE_6_2 kernel - namecache eviction fixes

Matthew Dillon dillon at
Thu Jun 16 12:08:27 PDT 2022

commit 68dce0827fee87caff11b2b9939aceec9ba9ba1b
Author: Matthew Dillon <dillon at>
Date:   Fri Jun 10 21:38:37 2022 -0700

    kernel - namecache eviction fixes
    * Fix several namecache eviction issues which interfere with nlookup*()
      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
    * 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
    * 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(-)

DragonFly BSD source repository

More information about the Commits mailing list