git: kernel - Redo struct vmspace allocator and ref-count handling.

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Jul 22 18:59:28 PDT 2014


commit 93f86408bb378310ca0663f56f5873e7eef90704
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Jul 22 18:52:47 2014 -0700

    kernel - Redo struct vmspace allocator and ref-count handling.
    
    * Get rid of the sysref-based allocator and ref-count handler and
      replace with objcache.  Replace all sysref API calls in other kernel
      modules with vmspace_*() API calls (adding new API calls as needed).
    
    * Roll-our-own hopefully safer ref-count handling.  We get rid of exitingcnt
      and instead just leave holdcnt bumped during the exit/reap sequence.  We
      add vm_refcnt and redo vm_holdcnt.
    
      Now a formal reference (vm_refcnt) is ALSO covered by a holdcnt.  Stage-1
      termination occurs when vm_refcnt transitions from 1->0.  Stage-2 termination
      occurs when vm_holdcnt transitions from 1->0.
    
    * Should fix rare reported panic under heavy load.

Summary of changes:
 sys/kern/imgact_resident.c             |   2 +-
 sys/kern/init_main.c                   |   3 +-
 sys/kern/kern_exec.c                   |   2 +-
 sys/kern/kern_exit.c                   |  17 +-
 sys/kern/kern_kinfo.c                  |   8 -
 sys/kern/tty.c                         |   5 +
 sys/platform/pc32/i386/pmap.c          |   4 +-
 sys/platform/pc64/vmm/vmx.c            |   2 +-
 sys/platform/pc64/x86_64/pmap.c        |   4 +-
 sys/platform/vkernel/platform/pmap.c   |   4 +-
 sys/platform/vkernel64/platform/pmap.c |   4 +-
 sys/vfs/procfs/procfs_mem.c            |   3 +-
 sys/vm/vm_extern.h                     |  11 +-
 sys/vm/vm_glue.c                       |   2 +-
 sys/vm/vm_map.c                        | 297 ++++++++++++++++++---------------
 sys/vm/vm_map.h                        |  19 +--
 sys/vm/vm_mmap.c                       |   2 +-
 sys/vm/vm_vmspace.c                    |   4 +-
 18 files changed, 211 insertions(+), 182 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/93f86408bb378310ca0663f56f5873e7eef90704


-- 
DragonFly BSD source repository



More information about the Commits mailing list