the bitrig haesbaert_movedead branch has been created by haesbaert. it is 0 commits behind master, and 2 commits ahead.
commit a72c8d467f5477c7f85a926e982776a81acb20f2 diff: https://github.com/bitrig/bitrig/commit/a72c8d4 author: Christiano F. Haesbaert <[email protected]> date: Tue Feb 10 22:12:41 2015 +0100 Call reaper_movedead() from proc_trampoline_mp() as well M sys/kern/kern_fork.c commit 640d3ae23e425dffe199d5f4dfef2b44599d6b1f diff: https://github.com/bitrig/bitrig/commit/640d3ae author: Christiano Haesbaert <[email protected]> date: Tue Feb 10 21:36:44 2015 +0100 Introduce reaper_moveproc() and stop making an extra context switch for every sys_exit(). The situation before this diff is as follows: 1 process A calls exit(). 2 at some point A's proc{} goes into spc_schedstate.deadproc_list 3 the final step of exit() does cpu_switchto(idle) 4 idle takes over, and moves the contents of the deadproc_list to the reaper list, waking up the reaper. Awesome oder was ? Now the situation is as follows: 1 process A calls exit(). 2 at some point A's proc{} goes into spc_schedstate.deadproc_list 3 the final step of exit() does cpu_switchto(sched_chooseproc()), which just jumps to whatever the scheduler tells us. 4 almost every process (except new processes) wakes up in mi_switch(), so in mi_switch we move the deadprocs to the reaper. We cannot move the deadproc to the reaper directly as the reaper might start to run in another cpu and reap us while we are still onproc. So this dance is necessary. There are other ways to improve this as well, but as a first step this should be enough. This also eliminates a harmless sleeper/waker race in the reaper. M sys/kern/kern_exit.c M sys/kern/kern_sched.c M sys/kern/sched_bsd.c M sys/sys/proc.h
