Further isolate the user process scheduler data by moving more variables
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 29 May 2006 03:57:21 +0000 (03:57 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 29 May 2006 03:57:21 +0000 (03:57 +0000)
commit52eedfb5ec3690b943858e66c64256b1683c1072
treec5be90b7205cf38c6e3cf02cfca0fc5d933e8db9
parent7bbde2b7f4d4e346c9eebca4c9ae1dd48545f3c0
Further isolate the user process scheduler data by moving more variables
from the globaldata structure to the scheduler module(s).

Make the user process scheduler MP safe.  Make the LWKT 'pull thread'
(to a different cpu) feature MP safe.  Streamline the user process
scheduler API.

Do a near complete rewrite of the BSD4 scheduler.  Remote reschedules
(reschedules to other cpus), cpu pickup of queued processes, and locality
of reference handling should make the new BSD4 scheduler a lot more
responsive.

Add a demonstration user process scheduler called 'dummy'
(kern/usched_dummy.c).  Add a kenv variable 'kern.user_scheduler' that
can be set to the desired scheduler on boot (i.e. 'bsd4' or 'dummy').

NOTE: Until more of the system is taken out from under the MP lock,
these changes actually slow things down slightly.  Buildworlds are
about ~2.7% slower.
13 files changed:
sys/conf/files
sys/ddb/db_ps.c
sys/i386/i386/trap.c
sys/kern/init_main.c
sys/kern/kern_synch.c
sys/kern/kern_usched.c
sys/kern/lwkt_thread.c
sys/kern/usched_bsd4.c
sys/kern/usched_dummy.c [new file with mode: 0644]
sys/platform/pc32/i386/trap.c
sys/sys/globaldata.h
sys/sys/thread.h
sys/sys/usched.h