git: kernel - Replace global vmobj_token with vmobj_tokens[] array

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Oct 24 17:10:54 PDT 2013


commit 7b00fbb4c0ce96d5b7130b22da7d0f9b06084e06
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Oct 24 17:01:28 2013 -0700

    kernel - Replace global vmobj_token with vmobj_tokens[] array
    
    * Remove one of the two remaining major bottlenecks in the system, the
      global vmobj_token which is used to manage access to the vm_object_list.
      All VM object creation and deletion would get thrown into this list.
    
    * Replace it with an array of 64 tokens and an array of 64 lists.
      vmobj_token[] and vm_object_lists[].  Use a simple right-shift
      hash code to index the array.
    
    * This reduces contention by a factor of 64 or so which makes a big
      difference on multi-chip cpu systems.  It won't be as noticable on
      single-chip (e.g. 4-core/8-thread) systems.
    
    * Rip-out some of the linux vmstats compat functions which were iterating
      the object list and replace with the pcpu accumulator scan that was
      recently implemented for dragonfly vmstats.
    
    * TODO: proc_token.

Summary of changes:
 .../linux/i386/linprocfs/linprocfs_misc.c          |  15 +-
 sys/emulation/linux/linux_misc.c                   |  14 +-
 sys/gnu/vfs/ext2fs/ext2_vfsops.c                   |   6 +-
 sys/kern/lwkt_token.c                              |   2 -
 sys/kern/vfs_mount.c                               |  13 +-
 sys/kern/vfs_subr.c                                |  25 +--
 sys/sys/thread.h                                   |   1 -
 sys/vm/swap_pager.c                                |  59 +++---
 sys/vm/vm_object.c                                 | 211 ++++++++++++---------
 sys/vm/vm_object.h                                 |  13 +-
 sys/vm/vm_swapcache.c                              |  79 ++++----
 11 files changed, 223 insertions(+), 215 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7b00fbb4c0ce96d5b7130b22da7d0f9b06084e06


-- 
DragonFly BSD source repository


More information about the Commits mailing list