the bitrig haesbaert_movedead branch has been created by haesbaert. it is 0 commits behind master, and 1 commit ahead.
commit 76ced57b53c616ee822cf39a63d144850f87c0a2 diff: https://github.com/bitrig/bitrig/commit/76ced57b 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. M sys/kern/kern_exit.c M sys/kern/kern_sched.c M sys/kern/sched_bsd.c M sys/sys/proc.h
