Subject: Implementation of SCHED_M2 scheduler
To: None <>
From: Mindaugas R. <>
List: tech-kern
Date: 10/04/2007 16:57:59

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.

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

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

MySQL benchmark on 4 x 700 MHz P-III Xeon (thanks Andrew for doing this!):
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,