git: DragonFly_RELEASE_2_8 kernel - x86_64 - Add additional checks to lwp_wait() & friends
dillon at crater.dragonflybsd.org
Sun Oct 24 09:39:41 PDT 2010
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Sat Oct 23 09:35:14 2010 -0700
kernel - x86_64 - Add additional checks to lwp_wait() & friends
* lwp_wait() must defer reaping of a lwp that is still running on another
cpu (i.e. in the midst of exiting).
* It shouldn't be possible for this to happen but just incase the thread
gets switched out after TDF_EXITING has been set, also make sure
the threat is no longer on the LWKT run queue.
* Remove old debugging in the LWKT scheduler path.
* Protect gd_freetd (per-cpu td cache) with a critical section. Again
this case should not occur as new threads are not allocated from
interrupts, but protect it anyway. Also assert that the cached free
td is in no way still scheduled.
Note that this cache is required to ensure that the td does not
end up in the MP-accessible objcache before it has been fully
Summary of changes:
sys/kern/kern_exit.c | 6 +++---
sys/kern/lwkt_thread.c | 48 +++++++++++++-----------------------------------
2 files changed, 16 insertions(+), 38 deletions(-)
DragonFly BSD source repository
More information about the Commits