git: hammer2 hammer2 - Integrate CCMS thread lock into hammer2 chain structure

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Jun 7 23:59:18 PDT 2012


commit a0ed3c24c92cd8616cf55e46d1776cd2373acb71
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Jun 7 23:52:01 2012 -0700

    hammer2 - Integrate CCMS thread lock into hammer2 chain structure
    
    * Integrate the CCMS thread lock into the hammer2 chain structure.
    
    * Implement shared and exclusive modes (hammer2 was only really using
      exclusive mode before).  Rework all the chain and inode locking functions
      to use CCMS via chain->cst.
    
      This also required changing the SPLAY trees into RB trees.
    
    * Start reworking non-modifying VNOPS to use shared CCMS locks.
    
    * Rework the hammer2_chain_drop() function to avoid deadlocks due to the
      mixed shared/exclusive locks we now support.
    
    * Major performance improvements for concurrent access.  SHARED locks now
      extend to hammer2_chain and hammer2_inode structural accesses, recursions,
      and cached data (buffer cache) accesses.
    
      In particular, multiple threads can now access the same bp via a
      hammer2_chain locked shared.  The bp's themselves are still exclusive
      only (the kernel APIs haven't changed), but the hammer2_chain structure
      can now share the bp's data across several threads accessing it via the
      chain.

Summary of changes:
 sys/vfs/hammer2/Makefile         |    2 +-
 sys/vfs/hammer2/hammer2.h        |   12 +-
 sys/vfs/hammer2/hammer2_ccms.c   |  147 ++++++++++++++--
 sys/vfs/hammer2/hammer2_ccms.h   |    4 +
 sys/vfs/hammer2/hammer2_chain.c  |  353 ++++++++++++++++++++++++++++----------
 sys/vfs/hammer2/hammer2_inode.c  |   34 ++---
 sys/vfs/hammer2/hammer2_subr.c   |   10 +-
 sys/vfs/hammer2/hammer2_vfsops.c |   10 +-
 sys/vfs/hammer2/hammer2_vnops.c  |   39 +++--
 9 files changed, 462 insertions(+), 149 deletions(-)

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


-- 
DragonFly BSD source repository





More information about the Commits mailing list