cvs commit: src/bin/ps print.c ps.1 ps.c src/sys/dev/raid/vinum vinumdaemon.c src/sys/emulation/linux/i386 linux_ptrace.c src/sys/emulation/posix4 ksched.c src/sys/emulation/svr4 svr4_misc.c src/sys/i386/i386 db_trace.c pmap.c procfs_machdep.c ...

Matthew Dillon dillon at
Mon Nov 14 10:52:23 PST 2005

dillon      2005/11/14 10:50:18 PST

DragonFly src repository

  Modified files:
    bin/ps               print.c ps.1 ps.c 
    sys/dev/raid/vinum   vinumdaemon.c 
    sys/emulation/linux/i386 linux_ptrace.c 
    sys/emulation/posix4 ksched.c 
    sys/emulation/svr4   svr4_misc.c 
    sys/i386/i386        db_trace.c pmap.c procfs_machdep.c trap.c 
    sys/kern             init_main.c kern_exit.c kern_fork.c 
                         kern_proc.c kern_resource.c kern_sig.c 
                         kern_synch.c lwkt_thread.c sys_generic.c 
                         sys_process.c tty.c usched_bsd4.c 
    sys/netproto/smb     smb_subr.c 
    sys/sys              kernel.h proc.h systm.h thread.h 
    sys/vfs/procfs       procfs_ctl.c procfs_dbregs.c 
                         procfs_fpregs.c procfs_regs.c 
    sys/vm               pmap.h vm_fault.c vm_glue.c vm_meter.c 
    usr.bin/systat       pigs.c 
    usr.bin/top          machine.c 
  Make tsleep/wakeup() MP SAFE for kernel threads and get us closer to
  making it MP SAFE for user processes.  Currently the code is operating
  under the rule that access to a thread structure requires cpu locality of
  reference, and access to a proc structure requires the Big Giant Lock.  The
  two are not mutually exclusive so, for example, tsleep/wakeup on a proc
  needs both cpu locality of reference *AND* the BGL.  This was true with the
  old tsleep/wakeup and has now been documented.
  The new tsleep/wakeup algorithm is quite simple in concept.  Each cpu has its
  own ident based hash table and each hash slot has a cpu mask which tells
  wakeup() which cpu's might have the ident.  A wakeup iterates through all
  candidate cpus simply by chaining the IPI message through them until either
  all candidate cpus have been serviced, or (with wakeup_one()) the requested
  number of threads have been woken up.
  Other changes made in this patch set:
  * The sense of P_INMEM has been reversed.  It is now P_SWAPPEDOUT.  Also,
    P_SWAPPING, P_SWAPINREQ are not longer relevant and have been removed.
  * The swapping code has been cleaned up and seriously revamped.  The new
    swapin code staggers swapins to give the VM system a chance to respond
    to new conditions.  Also some lwp-related fixes were made (more
    p_rtprio vs lwp_rtprio confusion).
  * As mentioned above, tsleep/wakeup have been rewritten.  The process
    p_stat no longer does crazy transitions from SSLEEP to SSTOP.  There is
    now only SSLEEP and SSTOP is synthesized from P_SWAPPEDOUT for userland
    consumpion.  Additionally, tsleep() with PCATCH will NO LONGER STOP THE
    PROCESS IN THE TSLEEP CALL.  Instead, the actual stop is deferred until
    the process tries to return to userland.  This removes all remaining cases
    where a stopped process can hold a locked kernel resource.
  * A P_BREAKTSLEEP flag has been added.  This flag indicates when an event
    occurs that is allowed to break a tsleep with PCATCH.  All the weird
    undocumented setrunnable() rules have been removed and replaced with a
    very simple algorithm based on this flag.
  * Since the UAREA is no longer swapped, we no longer faultin() on PHOLD().
    This also incidently fixes the 'ps' command's tendancy to try to swap
    all processes back into memory.
  * speedup_syncer() no longer does hackish checks on proc0's tsleep channel
  * Userland scheduler acquisition and release has now been tightened up and
    KKASSERT's have been added (one of the bugs Stefan found was related
    to an improper lwkt_schedule() that was found by one of the new assertions).
    We also have added other assertions related to expected conditions.
  * A serious race in pmap_release_free_page() has been corrected.  We
    no longer couple the object generation check with a failed
    pmap_release_free_page() call.  Instead the two conditions are checked
    independantly.  We no longer loop when pmap_release_free_page() succeeds
    (it is unclear how that could ever have worked properly).
  Major testing by: Stefan Krueger <skrueger at xxxxxxxxxxxxxxxx>
  Revision  Changes    Path
  1.24      +3 -3      src/bin/ps/print.c
  1.7       +1 -1      src/bin/ps/ps.1
  1.18      +3 -2      src/bin/ps/ps.c
  1.6       +1 -1      src/sys/dev/raid/vinum/vinumdaemon.c
  1.9       +2 -2      src/sys/emulation/linux/i386/linux_ptrace.c
  1.6       +4 -4      src/sys/emulation/posix4/ksched.c
  1.30      +1 -1      src/sys/emulation/svr4/svr4_misc.c
  1.11      +1 -1      src/sys/i386/i386/db_trace.c
  1.53      +15 -73    src/sys/i386/i386/pmap.c
  1.5       +7 -7      src/sys/i386/i386/procfs_machdep.c
  1.66      +32 -11    src/sys/i386/i386/trap.c
  1.51      +2 -2      src/sys/kern/init_main.c
  1.48      +1 -1      src/sys/kern/kern_exit.c
  1.44      +1 -1      src/sys/kern/kern_fork.c
  1.21      +10 -8     src/sys/kern/kern_proc.c
  1.24      +2 -2      src/sys/kern/kern_resource.c
  1.39      +137 -116  src/sys/kern/kern_sig.c
  1.53      +218 -212  src/sys/kern/kern_synch.c
  1.86      +13 -26    src/sys/kern/lwkt_thread.c
  1.23      +9 -4      src/sys/kern/sys_generic.c
  1.18      +9 -3      src/sys/kern/sys_process.c
  1.19      +1 -1      src/sys/kern/tty.c
  1.4       +28 -17    src/sys/kern/usched_bsd4.c
  1.8       +6 -7      src/sys/kern/vfs_sync.c
  1.16      +1 -1      src/sys/netproto/smb/smb_subr.c
  1.18      +1 -0      src/sys/sys/kernel.h
  1.72      +15 -14    src/sys/sys/proc.h
  1.33      +1 -0      src/sys/sys/systm.h
  1.73      +7 -0      src/sys/sys/thread.h
  1.8       +13 -4     src/sys/vfs/procfs/procfs_ctl.c
  1.7       +1 -1      src/sys/vfs/procfs/procfs_dbregs.c
  1.7       +1 -1      src/sys/vfs/procfs/procfs_fpregs.c
  1.8       +1 -1      src/sys/vfs/procfs/procfs_regs.c
  1.11      +5 -4      src/sys/vfs/procfs/procfs_status.c
  1.16      +0 -2      src/sys/vm/pmap.h
  1.20      +2 -1      src/sys/vm/vm_fault.c
  1.36      +96 -81    src/sys/vm/vm_glue.c
  1.8       +6 -6      src/sys/vm/vm_meter.c
  1.16      +4 -4      src/sys/vm/vm_pageout.c
  1.11      +1 -1      src/usr.bin/systat/pigs.c
  1.18      +1 -1      src/usr.bin/top/machine.c

More information about the Commits mailing list