hammer2 - Refactor bulkfree
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 30 Aug 2015 21:17:35 +0000 (14:17 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 30 Aug 2015 21:17:35 +0000 (14:17 -0700)
commit125966e80c1aba734d3d5f12a8fcfde2bbcdb018
tree16b004e994052521d57dfd6ae41ad28c1bc837d2
parentdd9cad116189bce7a229f51279af450e09c1afb1
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.
sbin/hammer/hammer.8
sbin/hammer2/hammer2.8
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_bulkfree.c
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_strategy.c
sys/vfs/hammer2/hammer2_vfsops.c