Convert the lwp list into a red-black tree. This greatly reduces the
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 15 Aug 2007 03:15:07 +0000 (03:15 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 15 Aug 2007 03:15:07 +0000 (03:15 +0000)
commit3e29179341ca0388a813bf3a96b1dc2ec9025c48
tree17b6bb60a568a6a2c2c7f8d3f8b25c3ab5e31eba
parent792a98ed35db387a5a1e6ad77a5d4b3c92a8a981
Convert the lwp list into a red-black tree.  This greatly reduces the
overhead of looking up LWPs for numerous operations including select and
removes the hokey fork code that tried to avoid doing a list traversal.

One inefficiency remains which cannot be easily fixed, and may not matter
much anyway, and that is delivering a generic signal the process may have
to iterate through many LWPs before finding one that can handle the signal.
12 files changed:
sys/ddb/db_ps.c
sys/kern/init_main.c
sys/kern/kern_exit.c
sys/kern/kern_fork.c
sys/kern/kern_resource.c
sys/kern/kern_sig.c
sys/kern/sys_generic.c
sys/platform/pc32/i386/pmap.c
sys/platform/vkernel/platform/pmap.c
sys/sys/proc.h
sys/sys/tree.h
sys/vm/vm_vmspace.c