Dynsched - runtime CPU Scheduler Selection for Linux

Felix Obenhuber


Table of Contents

Current Status
Documentation
Known Bugs/Limitations
How to try?
Download the components
Patch the Kernel
Configure and build the Kernel
Give it a try!
The Dynsched Project
Page Source

Abstract

This project is aimed to switch the Linux CPU-scheduler at runtime. One goal is to run different schedulers on each CPU in a SMP system. The Dynsched Project is an extension on the Plugsched Patch by Peter Williams which let you decide at boot time what scheduling algorithm to use.

Current Status

Switching between ingosched, ingo_ll (low latency), nicksched and staircase works without any issues on up systems. On SMP you can assign schedulers to cpusets - what will affect only cpus in that specific set. Works fine with ingosched and ingo_ll and partly for nicksched and staircase. SMP support is still quite buggy.

Documentation

For now - read few locs…

Known Bugs/Limitations

  • prio / nice value jitter - different sched implementations…
  • SPA based scheduler: switching from / to SPAs cause the system to crash (work in progress)
  • SMP scheduler swiching still buggy. We loose some tasks during switch.
  • not possible: tune scheduler parameter for specific cpu only (multiple instances of the same scheduler)

How to try?

Download the components

  • Linux Kernel Version 2.6.8
  • Plugsched Patch Version 6.4 for linux-2.6.18
  • Dynsched Patch for 2.6.18 patched with plugsched.
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.tar.bz2
wget http://ovh.dl.sourceforge.net/sourceforge/cpuse/plugsched-6.4-for-2.6.18.patch
wget http://belnet.dl.sourceforge.net/sourceforge/dynsched/dynsched-0.2.4-for-linux-2.6.18-plugsched.patch

Patch the Kernel

tar xjf linux-2.6.18.tar.bz2
cd linux-2.6.18
patch -p1 < ../plugsched-6.4-for-2.6.18.patch
patch -p1 < ../dynsched-0.2.4-for-linux-2.6.18-plugsched.patch
cd ..

Configure and build the Kernel

read one of the one million docs out there if you don't know how to… take care of the following options:

#
# CPU schedulers
#
# CONFIG_CPUSCHED_SPA is not set
CONFIG_CPUSCHED_CHOICE=y
CONFIG_CPUSCHED_DYNSCHED=y
CONFIG_CPUSCHED_CHOOSE_BUILTINS=n

Give it a try!

UP

cat /sys/cpusched/dynsched/dynsched
Switch scheduler

e.g:

echo ingo_ll > /sys/cpusched/dynsched/dynsched

SMP

  1. examine cpuset documentation
  2. mount cpuset
  3. create any subsets (for testing set with only one cpu are recomended)
  4. use the dynsched file in a set like descibed obove

The Dynsched Project

The Dynsched Project was invoked as an student research project at the University of Applied Sciences Konstanz. Technical communication is done via the dynsched project sf malling list. Check the SF Dynsched Project Site. Thanks for comments and suggestions. Thanks to the community and the Sourceforge Team!

Page Source

Feel free to enhance this asciidoc: dynsched_sf_01.txt