git: kernel - Refactor vfs_cache 2/N

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Mar 2 17:29:12 PST 2020


commit 32d04ef81ba87a1ae9f15b7e09f72f6c5fcd6c11
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Feb 27 18:14:08 2020 -0800

    kernel - Refactor vfs_cache 2/N
    
    * Use lockmgr locks for the ncp lock.  Convert nc_lockstatus / nc_locktd
      to struct lock.
    
      lockmgr locks use atomic_fetchadd_*() instead of atomic_fcmpset_*()
      for nominal shared and exclusive lock count operations, which avoids
      contention loops on failed fcmpset operations.  There is still cache
      line contention but since the code doesn't have to loop so much it
      scales to core count a whole lot better.
    
    * Two experimental __cachealign's added to bloat struct namecache.  It
      won't stay this way.
    
    * Retain the non-optimal nc_vp ref count mess, which is why nc_vprefs
      is needed.  This will be fixed next.

Summary of changes:
 sys/kern/vfs_cache.c | 637 ++++++++++++++++++---------------------------------
 sys/sys/lock.h       |  24 ++
 sys/sys/namecache.h  |  19 +-
 3 files changed, 255 insertions(+), 425 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/32d04ef81ba87a1ae9f15b7e09f72f6c5fcd6c11


-- 
DragonFly BSD source repository



More information about the Commits mailing list