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 crater.dragonflybsd.org
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 
                         vfs_aio.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 
  Log:
  * 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
  fixed.
  
  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


http://www.dragonflybsd.org/cvsweb/src/sys/sys/proc.h.diff?r1=1.106&r2=1.107&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/imgact_resident.c.diff?r1=1.15&r2=1.16&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/init_main.c.diff?r1=1.75&r2=1.76&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_exec.c.diff?r1=1.55&r2=1.56&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_exit.c.diff?r1=1.79&r2=1.80&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_fork.c.diff?r1=1.67&r2=1.68&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_sig.c.diff?r1=1.76&r2=1.77&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_aio.c.diff?r1=1.38&r2=1.39&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/platform/pc32/i386/pmap.c.diff?r1=1.77&r2=1.78&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/platform/pc32/i386/swtch.s.diff?r1=1.44&r2=1.45&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/platform/pc32/i386/trap.c.diff?r1=1.103&r2=1.104&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/platform/vkernel/i386/swtch.s.diff?r1=1.5&r2=1.6&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/platform/vkernel/i386/trap.c.diff?r1=1.22&r2=1.23&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/platform/vkernel/platform/pmap.c.diff?r1=1.20&r2=1.21&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/procfs/procfs_mem.c.diff?r1=1.15&r2=1.16&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/pmap.h.diff?r1=1.24&r2=1.25&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vm_extern.h.diff?r1=1.25&r2=1.26&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vm_glue.c.diff?r1=1.53&r2=1.54&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vm_map.c.diff?r1=1.55&r2=1.56&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vm_map.h.diff?r1=1.29&r2=1.30&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vm_mmap.c.diff?r1=1.37&r2=1.38&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vm_vmspace.c.diff?r1=1.10&r2=1.11&f=u





More information about the Commits mailing list