git: hammer2 - freemap part 2 - cleanup & performance pass
Matthew Dillon
dillon at crater.dragonflybsd.org
Fri May 17 18:47:30 PDT 2013
commit 512beabd66d77a7cca8f73bf69030ffa90f0b9e3
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Fri May 17 18:17:47 2013 -0700
hammer2 - freemap part 2 - cleanup & performance pass
* Increase minimum I/O from 1K to 16K (HAMMER2_LBUFSIZE).
* Adjust some use cases, increasing the smallest indirect block to the
minimum IO size 4K->16K.
* The BREF_TYPE_FREEMAP_LEAF bitmap is now embedded in the chain, allowing
us to use the 256 byte bitmaps more safely. As with inodes, a read-in
involves using a larger buffer-cache buffer and then copying the data
into the chain.
* Avoid unnecessary reads from disk when allocating blocks that are less
than the minimum IO size. If it is determined that the bitmap bits
covering the minimum IO size are 0 (unallocated), we pre-validate the
larger buffer cache buffer so the later bread() does not have to issue
any actual reads.
Pre-validation for allocations larger than or equal to the minimum IO
size is already handled in the chain locking code.
With this change, a cpdup into H2 will issue mostly writes and is able
to avoid nearly all reads.
* Make some progress formalizing chain-embedded data.
Summary of changes:
sys/vfs/hammer2/hammer2.h | 2 +-
sys/vfs/hammer2/hammer2_chain.c | 62 +++++++++++++++++++++-------
sys/vfs/hammer2/hammer2_disk.h | 20 +++++----
sys/vfs/hammer2/hammer2_flush.c | 87 ++++++++++++++++++++++-----------------
sys/vfs/hammer2/hammer2_freemap.c | 67 ++++++++++++++++++++++++------
sys/vfs/hammer2/hammer2_inode.c | 17 --------
sys/vfs/hammer2/hammer2_subr.c | 4 +-
sys/vfs/hammer2/hammer2_vfsops.c | 4 ++
sys/vfs/hammer2/hammer2_vnops.c | 4 +-
9 files changed, 173 insertions(+), 94 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/512beabd66d77a7cca8f73bf69030ffa90f0b9e3
--
DragonFly BSD source repository
More information about the Commits
mailing list