cvs commit: src/sys/sys proc.h src/sys/kern imgact_resident.c init_main.c kern_exec.c kern_exit.c kern_fork.c kern_sig.c vfs_aio.c src/sys/platform/pc32/i386 pmap.c swtch.s trap.c src/sys/platform/vkernel/i386 swtch.s trap.c ...

Matthew Dillon dillon at
Sun Apr 29 11:29:03 PDT 2007

dillon      2007/04/29 11:25:41 PDT

DragonFly src repository

  Modified files:
    sys/sys              proc.h 
    sys/kern             imgact_resident.c init_main.c kern_exec.c 
                         kern_exit.c kern_fork.c kern_sig.c 
    sys/platform/pc32/i386 pmap.c swtch.s trap.c 
    sys/platform/vkernel/i386 swtch.s trap.c 
    sys/platform/vkernel/platform pmap.c 
    sys/vfs/procfs       procfs_mem.c 
    sys/vm               pmap.h vm_extern.h vm_glue.c vm_map.c 
                         vm_map.h vm_mmap.c vm_vmspace.c 
  * Use SYSREF for vmspace structures.  This replaces the vmspace structure's
    roll-your-own refcnt implementation and replaces its zalloc backing store.
    Numerous procedures have been added to handle termination and DTOR
    operations and to properly interlock with vm_exitingcnt, all centered
    around the vmspace_sysref_class declaration.
  * Replace pmap_activate() and pmap_deactivate() with add pmap_replacevm().
    This replaces numerous instances where roll-your-own deactivate/activate
    sequences were being used, creating small windows of opportunity where
    an update to the kernel pmap would not be visible to running code.
  * Properly deactivate pmaps and add assertions to the fact in the teardown
    code.  Cases had to be fixed in cpu_exit_switch(), the exec code, the
    AIO code, and a few other places.
  * Add pmap_puninit() which is called as part of the DTOR sequence for
    vmspaces, allowing the kmem mapping and VM object to be recovered.
    We could not do this with the previous zalloc() implementation.
  * Properly initialize the per-cpu sysid allocator (globaldata->gd_sysid_alloc).
  Make the following adjustments to the LWP exiting code.
  * P_WEXIT interlocks the master exiting thread, eliminating races which can
    occur when it is signaling the 'other' threads.
  * LWP_WEXIT interlocks individual exiting threads, eliminating races which
    can occur there and streamlining some of the tests.
  * Don't bother queueing the last LWP to the reaper.  Instead, just leave it
    in the p_lwps list (but still decrement nthreads), and add code to
    kern_wait() to reap the last thread.  This improves exit/wait performance
    for unthreaded applications.
  * Fix a VMSPACE teardown race in the LWP code.  It turns out that it was
    still possible for the VMSPACE for an exiting LWP to be ripped out from
    under it by the reaper (due to a conditional that was really supposed to
    be a loop), or by kern_wait() (due to not waiting for all the LWPs to
    enter an exiting state).  The fix is to have the LWPs PHOLD() the process
    and then PRELE() it when they are reaped.
  This is a little mixed up because the addition of SYSREF revealed a number
  of other semi-related bugs in the pmap and LWP code which also had to be
  Revision  Changes    Path
  1.107     +2 -2      src/sys/sys/proc.h
  1.16      +3 -1      src/sys/kern/imgact_resident.c
  1.76      +4 -2      src/sys/kern/init_main.c
  1.56      +2 -1      src/sys/kern/kern_exec.c
  1.80      +95 -48    src/sys/kern/kern_exit.c
  1.68      +4 -3      src/sys/kern/kern_fork.c
  1.77      +13 -6     src/sys/kern/kern_sig.c
  1.39      +9 -45     src/sys/kern/vfs_aio.c
  1.78      +51 -24    src/sys/platform/pc32/i386/pmap.c
  1.45      +12 -0     src/sys/platform/pc32/i386/swtch.s
  1.104     +1 -1      src/sys/platform/pc32/i386/trap.c
  1.6       +12 -0     src/sys/platform/vkernel/i386/swtch.s
  1.23      +1 -1      src/sys/platform/vkernel/i386/trap.c
  1.21      +44 -24    src/sys/platform/vkernel/platform/pmap.c
  1.16      +10 -6     src/sys/vfs/procfs/procfs_mem.c
  1.25      +3 -2      src/sys/vm/pmap.h
  1.26      +0 -1      src/sys/vm/vm_extern.h
  1.54      +5 -4      src/sys/vm/vm_glue.c
  1.56      +113 -72   src/sys/vm/vm_map.c
  1.30      +11 -4     src/sys/vm/vm_map.h
  1.38      +1 -1      src/sys/vm/vm_mmap.c
  1.11      +7 -11     src/sys/vm/vm_vmspace.c

More information about the Commits mailing list