git: kernel - Improve vfork/exec and wait*() performance

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Oct 24 13:43:29 PDT 2013


commit 51818c080ae8be00bbd3d0bb4d584ac82a1fb9ec
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Oct 24 12:03:23 2013 -0700

    kernel - Improve vfork/exec and wait*() performance
    
    * Use a flags interlock instead of a token interlock for PPWAIT for
      vfork/exec (handling when the parent must wait for the child to
      finish exec'ing).
    
    * The exit1() code must wakeup the parent's wait*()'s.  Delay the wakeup
      until after the token has been released.
    
    * Change thet interlock in the parent's wait*() code to use a generation
      counter.
    
    * Do not wakeup p_nthreads on exit if the program was never multi-threaded,
      saving a few cycles.

Summary of changes:
 sys/kern/kern_exec.c |   7 ++--
 sys/kern/kern_exit.c | 100 ++++++++++++++++++++++++++++++++-------------------
 sys/kern/kern_fork.c |  39 +++++++++++---------
 sys/kern/kern_proc.c |  53 +++++++++++++++++++--------
 sys/sys/proc.h       |  14 +++-----
 5 files changed, 135 insertions(+), 78 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/51818c080ae8be00bbd3d0bb4d584ac82a1fb9ec


-- 
DragonFly BSD source repository



More information about the Commits mailing list