git: hammer2 - Optimize out read I/O on new allocations

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Mar 14 23:33:06 PDT 2015


commit 7100800184765247152118d28d0a45c4e71e13b5
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Mar 14 23:26:59 2015 -0700

    hammer2 - Optimize out read I/O on new allocations
    
    * Fix a regression.  When DIO went strictly to 64KB blocks,
      hammer2_devblksize() did not follow suit.  This resulted it
      unnecessary read-before-write I/Os on smaller blocks allocated from
      fresh full-block freemap areas.
    
      This fix effectively removes almost all read I/O when writing fresh files
      to HAMMER2 filesystem, or copying from data already cached into the
      HAMMER2 filesystem.
    
    * Allow inodes to be locked without having to load the related meta-data.
      This removes unnecessary read I/Os when reclaiming old vnodes from the
      vnode cache (whos inodes might no longer be in the buffer cache or the
      VM page cache).  Removes unnecessary reads during a umount and during
      normal vnode recyclement once system caches have reached steady-state.
    
      This change involved flagging the nlinks == 0 inode state in the chain
      flags so the inode meta-data does not have to be read.

Summary of changes:
 sys/vfs/hammer2/hammer2.h         | 15 +++++++++++++--
 sys/vfs/hammer2/hammer2_cluster.c | 34 +++++++++++++++++++++++++++++++++
 sys/vfs/hammer2/hammer2_inode.c   | 40 ++++++++++++++++++++++++++++-----------
 sys/vfs/hammer2/hammer2_vnops.c   | 12 ++++--------
 4 files changed, 80 insertions(+), 21 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7100800184765247152118d28d0a45c4e71e13b5


-- 
DragonFly BSD source repository



More information about the Commits mailing list