First Release of the Modular Scheduler Core and Completely Fair Scheduler Patchset

Apr 24, 2007 11:12 GMT  ·  By

Igno Molnar, Linux kernel developer since 1995, announces the first release of a new patchset to fix the bugs and malfunctions from the vanilla scheduler regarding the desktop and server scheduling workloads. The patchset, named "Modular Scheduler Core and Completely Fair Scheduler Patchset" by its developer, is actually a rewrite of the normal Linux task scheduler, adding also new features to it such as the Scheduling Classes.

In order to benefit from the improvements brought by this patch you can download it, apply it to 2.6.21-rc6, recompile and then reboot, and now the new scheduler will be active by default.

Highlights:

■ introduction of Scheduling Classes: an extensible hierarchy of scheduler modules that encapsulate scheduling policy details ■ sched_fair.c implements the 'CFS desktop scheduler': a replacement for the vanilla scheduler's SCHED_OTHER interactivity code ■ the design is quite radical: it does not use runqueues, using a time-ordered rbtree to build a 'timeline' of future task execution, this way it doesn't need any 'array switch' artifacts ■ uses nanosecond granularity accounting and does not rely on any jiffies or other HZ detail and thus it has nothing related to 'timeslices' or heuristics which makes it non-vulnerable against the attacks against the heuristics of the stock scheduler ■ it benefits of a much stronger handling of levels and SCHED_BATCH assuring a better divide between the two workloads types ■ sched_rt.c implements SCHED_FIFO and SCHED_RR semantics more effectively, compared to the vanilla scheduler, by using 100 runqueues for 100 RT priority levels, instead of 140 in the vanilla scheduler ■ the core scheduler got smaller by more than 700 lines of code

The Modular Scheduler Core and Completely Fair Scheduler (CFS) has a smaller size due to the deletion of the array and its data structure overhead that were not used anymore.