DragonFly BSD
DragonFly commits List (threaded) for 2012-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Jun 2012 23:59:18 -0700 (PDT)

commit a0ed3c24c92cd8616cf55e46d1776cd2373acb71
Author: Matthew Dillon <dillon@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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]