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

git: kernel - Fix race in multi-LWP exit


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Nov 2011 22:18:55 -0800 (PST)

commit 2af9d75dac792301c2672459217b4b91c60a1d1f
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Mon Nov 28 22:13:38 2011 -0800

    kernel - Fix race in multi-LWP exit
    
    * Fix a very small race condition after TDF_EXITING could get set where a
      LWPs thread could get destroyed by another cpu (reaping it) before
      the thread actually finished exiting.
    
    * Clean up a case where we were improperly testing TDF_RUNQ which could
      result in unnecessary 1-tick delays in exit reaping.
    
    * Beef up the assertion when TDF_EXITING is found to be set that
      both TDF_RUNQ and TDF_TSLEEPQ are not set (before it was just checking
      TDF_TSLEEPQ).
    
    * Clean up reaplwp().
    
    * Remove lwkt_wait_free()
    
    * lwkt_free_thread() now waits for td_refs to drop to 0 before freeing
      the thread.

Summary of changes:
 sys/kern/kern_exit.c   |   62 +++++++++++++++++++++++++++++++----------------
 sys/kern/lwkt_thread.c |   31 +++++++++++++-----------
 2 files changed, 58 insertions(+), 35 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2af9d75dac792301c2672459217b4b91c60a1d1f


-- 
DragonFly BSD source repository



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