The Redline kernel uses the Linux kernel 220.127.116.11 as a base, combined with Ingo Molnar's new CFS scheduler which was merged into Linux kernel mainstream summer 2007. We started our implementation before the merge happened. The Redline kernel adds a new scheduling class that uses EDF with eligibility control in CPU scheduler, modifies virtual memory manager (VMM) to protect pages used by interactive tasks. It also modifies several layers in the system related to I/O management, such as page writeback, the file system, journaling, and the I/O scheduler. All these modifications aim to maintain responsiveness even when the system is overloaded (in terms of CPU, memory or I/O bandwidth).
- Kernel Installation
Step 1: download Linux kernel 18.104.22.168 here, then download CFS V20.3 patch and Redline-V1.6 from Downloads section above. Extract kernel source into a local directory, say /your_source/, then apply patches using following commands:
$patch -p1 < cfs-v20.3.patch
$patch -p1 < redline-v1.t.patch
Step 2: compile your kernel. Here is an sample configuration file I used.
$make xconfig or make menuconfig
$make modules_install install
NOTE: Redline currently only works on Intel i386 platforms. However, Redline implementation does not touch any architecture-specific part, except adding two system calls to support setting and getting specifications for applications. Adding proper system calls into other architectures in the Linux kernel should also make Redline work.
NOTE: You may have to disable the following options in your kernel configuration file, even though by default they are disabled:
CONFIG_NUMA /* For NUMA */
CONFIG_MC /* For Multi-Core */
CONFIG_RT_MUTEXES /* For Mutex Priority Inheritance */
CONFIG_NOMMU /* no MMU, for systems that have no VM */
- System Setup using SpecTools
Redline is specification-driven, so you need to setup specifications for your system, and also manage them. SpecTools is a package that allows you to do these tasks. It contains a specification table, several binary tools for setting/getting specifications, and several scripts. For details, please refer to README.SPECTOOLS in the downloaded package.
Step 1: Before you can compile SpecTools, you need first add necessary system call interface, because Redline adds two system calls. You need to
replace: /usr/include/asm/unistd.h (or whatever suitable file in your system)
with : /include/asm-i386/unistd.h (in your downloaded kernel source above)
Step 2: Download SpecTools from the Downloads section above, and then decompress it using
$tar -zxvf spectools.tar.gz
$make install /* You need have root privilege to do this */
This will setup a directory /etc/spec in your system, and generates proper specification files in that directory from specification.tab. You can do this manually using update_spec.pl script in the package. It also installs two binaries: set_pid_spec and get_pid_spec
Step 3: The last thing you need to do is add one line in your /etc/rc.d/rc.local
So that your system invokes this script after it boots up. This script will set specifications for kernel threads, which do not call do_execve() at all.
NOTE: The sample system specification provided by SpecTools, i.e. specification.tab, is configured for KDE desktop environment. Currently, Redline does not include specifications for GNOME. Most GUI applications currently inherit a default specification from KDE, when kdeinit fork and exec a new application. Firefox, mplayer, gmplayer, vim, gvim have their own specifications, either because they need more than the default or because they are often launched from a shell. You can provide your own specification for an application if necessary; please see README files in SpecTools package for how to do it.
Now, you are ready to reboot your system with Redline kernel. Enjoy!
- Setting Specification:
Please read README.SPECTOOLS and README.SPECIFICATIONS to see how to provide specification for applications
If you have any questions or suggestions, please contact Ting Yang at email@example.com or Emery Berger at firstname.lastname@example.org.
This material is based upon work supported by the National Science Foundation under CAREER Award CNS-0347339 and CNS-0615211. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.