Subject: Implementation of SCHED_M2 scheduler
To: None <tech-kern@netbsd.org>
From: Mindaugas R. <rmind@NetBSD.org>
List: tech-kern
Date: 10/04/2007 16:57:59
Hello,

here is the new scheduler implementation, based on the original approach of
SVR4, which also has various modifications in balancing and migration part
mostly based on Solaris approach (described in Solaris Internals). It
provides separate real-time (RT) and time-sharing (TS) queues, to differ the
kernel and user threads and provide POSIX real-time extensions. Please note,
that priority model (with separation of RT/TS ranges) has changed in
vmlocking branch. Also, the support for thread affinity is prepared.

http://www.netbsd.org/~rmind/m2/sched_m2.c
http://www.netbsd.org/~rmind/m2/sched.diff

Here are the results of SysBench OLTP PostgreSQL and MySQL benchmarks on the
Core 2 Duo T5500 machine (averages of 3x runs):

http://www.netbsd.org/~rmind/m2/pgsql_bench.png
http://www.netbsd.org/~rmind/m2/mysql_bench.png

I have also estimated ~4% improvement in the builds:

http://www.netbsd.org/~rmind/m2/buildkern.txt

MySQL benchmark on 4 x 700 MHz P-III Xeon (thanks Andrew for doing this!):

http://www.netbsd.org/~rmind/m2/mysql_bench_4x.png
This is a single run, and not with the latest version, thus - not accurate.

To test the scheduler, SCHED_M2 option to the kernel config should be added,
and SCHED_4BSD commented out. During the development, a lot of testing were
done, so I would tend to think that scheduler is stable, while still might be
tuned. This implementation is nohow related with the parts of SCHED_4BSD.

I am going to import it into the tree. Please review.

P.S. The name "SCHED_M2" is a result of poor imagination.

-- 
Best regards,
Mindaugas
www.NetBSD.org