git: kernel - Fix bugs and refactor namecache cleaning code

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Oct 28 16:12:36 PDT 2017


commit bf3f67a7c2acae2b8e097b00c9e13bc4241dfebb
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Oct 28 16:04:58 2017 -0700

    kernel - Fix bugs and refactor namecache cleaning code
    
    * Refactor the cleaning code.  For positive namecache entries,
      track based on NCHHASH linkages rather than v_namecache linkages.
      Also maintain a count of freeable (leaf) entries and use that
      in the _cache_cleanpos() code.
    
      This should hopefully fix a bug where the system can get stuck
      constantly calling _cache_cleanpos() in situations where there
      are not any freeable entries.
    
    * Refactor the negative namecache tracking code.  Move to a per-cpu
      structure where entries are made based on the current cpu and removed
      based on the recorded cpu.  Refactor the cleaning code to iterate
      the cpu list on a per-call basis which should hopefully allow multiple
      cpus to clean the ncneg lists concurrently.
    
      This reduces a SMP bottleneck, but does not deal with cache
      ping-ponging issues on related structures.
    
    Reported-by: ftigeot

Summary of changes:
 sys/kern/kern_clock.c |   1 +
 sys/kern/vfs_cache.c  | 202 ++++++++++++++++++++++++++++++++++++++------------
 sys/sys/namecache.h   |   4 +-
 3 files changed, 158 insertions(+), 49 deletions(-)

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


-- 
DragonFly BSD source repository


More information about the Commits mailing list