git: kernel - Rewrite vnode ref-counting code to improve performance

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Oct 21 11:23:43 PDT 2013


commit ee173d09dc3fba168bf56a31bffd0468b38f06ef
Author: Sascha Wildner <saw at online.de>
Date:   Sun Oct 20 10:04:36 2013 +0200

    kernel - Rewrite vnode ref-counting code to improve performance
    
    * Rewrite the vnode ref-counting code and modify operation to not
      immediately VOP_INACTIVE a vnode when its refs drops to 0.  By
      doing so we avoid cycling vnodes through exclusive locks when
      temporarily accessing them (such as in a path lookup).  Shared
      locks can be used throughout.
    
    * Track active/inactive vnodes a bit differently, keep track of
      the number of vnodes that are still active but have zero refs,
      and rewrite the vnode freeing code to use the new statistics
      to deactivate cached vnodes.

Summary of changes:
 sys/gnu/vfs/ext2fs/ext2_inode.c    |   4 +-
 sys/gnu/vfs/ext2fs/ext2_vnops.c    |   4 +-
 sys/kern/vfs_cache.c               |  13 +-
 sys/kern/vfs_lock.c                | 726 +++++++++++++++++++------------------
 sys/kern/vfs_mount.c               |  38 +-
 sys/kern/vfs_subr.c                |  23 +-
 sys/kern/vfs_syscalls.c            |   3 +-
 sys/sys/vnode.h                    |  45 ++-
 sys/vfs/fifofs/fifo_vnops.c        |   2 +-
 sys/vfs/hammer/hammer_inode.c      |   2 +-
 sys/vfs/hammer2/hammer2_inode.c    |   6 +-
 sys/vfs/hpfs/hpfs_vnops.c          |   2 +-
 sys/vfs/isofs/cd9660/cd9660_node.c |   4 +-
 sys/vfs/msdosfs/msdosfs_denode.c   |   8 +-
 sys/vfs/msdosfs/msdosfs_vfsops.c   |   7 +-
 sys/vfs/msdosfs/msdosfs_vnops.c    |   6 +-
 sys/vfs/nfs/nfs_node.c             |   4 +-
 sys/vfs/nfs/nfs_vnops.c            |  12 +-
 sys/vfs/ntfs/ntfs_vfsops.c         |   2 +-
 sys/vfs/ntfs/ntfs_vnops.c          |   4 +-
 sys/vfs/nwfs/nwfs_node.c           |   8 +-
 sys/vfs/nwfs/nwfs_vfsops.c         |   2 +-
 sys/vfs/nwfs/nwfs_vnops.c          |   4 +-
 sys/vfs/procfs/procfs_subr.c       |   2 +-
 sys/vfs/smbfs/smbfs_node.c         |   4 +-
 sys/vfs/smbfs/smbfs_vfsops.c       |   2 +-
 sys/vfs/smbfs/smbfs_vnops.c        |   4 +-
 sys/vfs/tmpfs/tmpfs_subr.c         |   2 +-
 sys/vfs/tmpfs/tmpfs_vfsops.c       |   2 +-
 sys/vfs/ufs/ufs_inode.c            |   4 +-
 sys/vfs/ufs/ufs_vnops.c            |   4 +-
 sys/vfs/union/union_subr.c         |  27 +-
 sys/vfs/union/union_vnops.c        |  25 +-
 sys/vm/vnode_pager.c               |   2 +-
 test/debug/vnodeinfo.c             |  20 +-
 usr.bin/systat/vmstat.c            |  35 +-
 usr.sbin/pstat/pstat.c             |   5 +-
 37 files changed, 567 insertions(+), 500 deletions(-)

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


-- 
DragonFly BSD source repository



More information about the Commits mailing list