DragonFly BSD
DragonFly commits List (threaded) for 2011-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: kernel - Make most of the fork and exit paths MPSAFE


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 12 Feb 2011 14:26:57 -0800 (PST)

commit b5c4d81fee4abb297f1e3c6e6514c4bfc3c68bc0
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Sat Feb 12 14:20:09 2011 -0800

    kernel - Make most of the fork and exit paths MPSAFE
    
    * Remove the MP lock from numerous system calls (mainly socket calls) that
      no longer need it.
    
    * Use proc_token in a couple of places that still need work (instead of
      the MP lock).  For example, the process group (pgrp) and several places
      which call pfind() still need to use the proc_token.
    
    * Use the per-process p->p_token in fork1(), exit1(), and lwp_exit().
      The critical portions of these paths now have significant concurrency.
    
    * Use the per-process p->p_token when traversing p->p_children, primarily
      aiding the kern_wait() code.  So the wait*() system calls should now
      have significant concurrency.
    
    * Change the fgetown() API to avoid certain races.
    
    * Add M_ZERO to the struct filedesc_to_leader allocation for safety
      purposes.

Summary of changes:
 sys/dev/drm/drm_drv.c                |    2 +-
 sys/kern/kern_descrip.c              |   81 +++++++++++++++++++++------------
 sys/kern/kern_exit.c                 |   67 +++++++++++++++++-----------
 sys/kern/kern_fork.c                 |   40 ++++++++++-------
 sys/kern/kern_ktrace.c               |   47 ++++++++++++--------
 sys/kern/kern_proc.c                 |   10 +++-
 sys/kern/kern_sig.c                  |    2 +
 sys/kern/subr_log.c                  |    4 +-
 sys/kern/sys_pipe.c                  |   10 +---
 sys/kern/sys_socket.c                |   27 +++--------
 sys/kern/tty.c                       |    2 +-
 sys/kern/uipc_syscalls.c             |   60 ++-----------------------
 sys/net/bpf.c                        |    4 +-
 sys/net/tap/if_tap.c                 |    4 +-
 sys/net/tun/if_tun.c                 |    4 +-
 sys/platform/pc32/i386/trap.c        |    4 +-
 sys/platform/pc64/x86_64/trap.c      |    4 +-
 sys/platform/vkernel/i386/trap.c     |    4 +-
 sys/platform/vkernel64/x86_64/trap.c |    4 +-
 sys/sys/filedesc.h                   |    2 +-
 20 files changed, 187 insertions(+), 195 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b5c4d81fee4abb297f1e3c6e6514c4bfc3c68bc0


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]