git: kernel - Recode the namecache mount transition cache

Matthew Dillon dillon at crater.dragonflybsd.org
Fri Feb 14 16:12:13 PST 2020


commit c41a7495e09ab290ff03dee5ee1194a6f3971c46
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Feb 14 16:04:14 2020 -0800

    kernel - Recode the namecache mount transition cache
    
    * DragonFlyBSD uses (mp, ncp/vp) tuples to track mount recursions,
      which allows nullfs to not have to create shadow vnodes.  However,
      this means that mount points cannot be stored in the vnode structure.
      Instead, DFly relies on a (mp, ncp) -> targetmp translation cache
      to avoid having to scan the mountlist.
    
    * Increase the size of this cache and convert it from a straight
      single-entry prime-number mod hash to a 4-way set-associative
      power-of-2 hash, and improve the hash algorithm.
    
    * This SIGNIFICANTLY reduces lock stalls during heavliy concurrent
      filesystem operations (aka bulk builds) when in the presence of
      a large number of mounts (again bulk builds with [d]synth).

Summary of changes:
 sys/kern/vfs_cache.c | 116 +++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 94 insertions(+), 22 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c41a7495e09ab290ff03dee5ee1194a6f3971c46


-- 
DragonFly BSD source repository


More information about the Commits mailing list