git: hammer2 - Refactor bulkfree

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Aug 30 14:26:08 PDT 2015


commit 125966e80c1aba734d3d5f12a8fcfde2bbcdb018
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Aug 30 14:17:35 2015 -0700

    hammer2 - Refactor bulkfree
    
    * Change the bulkfree scan from breadth-first to depth-first.  This
      improves disk performance significantly (~2x) and is also needed for the
      duplicate-detection feature.
    
    * Create an 8-way set-associative hash table similar to what the live
      dedup code uses.  Record the data_off for elements we have processed
      and detect if a duplicate is encountered so we do not have to re-process
      the duplicate subtree.
    
      Also prioritize the table based on the aggregate bottom-up inode count
      to reduce the chance that a top-level duplicate (aka snapshot) will get
      kicked out of the hash table.
    
    * Clean up the hammer2_chain_scan() API, making it more bref-centric
      which allows us to avoid instantiating chain structures for leaf
      entities.  This significantly improves performance and increases
      flexibility.
    
    * Manual page adjustments for kern.maxvnodes settings suggestions.

Summary of changes:
 sbin/hammer/hammer.8               |  18 +-
 sbin/hammer2/hammer2.8             |  21 +++
 sys/vfs/hammer2/hammer2.h          |  13 +-
 sys/vfs/hammer2/hammer2_bulkfree.c | 338 ++++++++++++++++++++++++-------------
 sys/vfs/hammer2/hammer2_chain.c    | 173 ++++++++++---------
 sys/vfs/hammer2/hammer2_flush.c    |   4 +-
 sys/vfs/hammer2/hammer2_strategy.c |  20 +++
 sys/vfs/hammer2/hammer2_vfsops.c   |  38 +++--
 8 files changed, 401 insertions(+), 224 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/125966e80c1aba734d3d5f12a8fcfde2bbcdb018


-- 
DragonFly BSD source repository


More information about the Commits mailing list