Kernel patch homepage of Con Kolivas

These are patches designed to improve system responsiveness with specific emphasis on the desktop, but suitable to any workload.
Latest patch: patch-2.6.10-ck5.bz2

Take me to all the 2.6 patches

Mailing list: ck mailing list: This is for release announcements, updates about development versions and general discussion pertaining to the -ck patchset. It is unmoderated and everyone is encouraged to post to it.

Other interesting links: - CK Overloaded - Full kernel source tarballs (thanks to Tim Savannah) - Nitro patches (based on ck).

IRC Channel: #ck


A complete scheduler policy rewrite

Infrastructure for more policies

Batch scheduling

Isochronous scheduling

mapped watermarkII
More gentle ram eviction sooner and less file cache (unlikely to swap).

Enables the CFQ (completely fair queueing) I/O scheduler by default

Allows 1G ram without enabling highmem

Minor latency improvement hacks

Other patches
Usually bugfixes


Sun Jan 9 16:44:46 2005
Audio problems?
Audio is such a big issue I've prepared a FAQ that I will update as needed. You can read it here:audio_hints.txt.

Tue Jan 4 18:52:34 EST 2005
Where is supermount?
In order to keep the set of patches as small as possible to make debugging easier, I include only patches that affect performance or are critical bugfixes. I do maintain supermount, however, since I still like how automounting works with supermount. You have to add the patch manually to -ck if you want to use this feature, and it can be found in the patches/ directory of each ck release.

Sun Aug 22 20:19:47 EST 2004
Mapped watermark??
This readjusts the way memory is evicted by lightly removing cached ram once the ram just under full capacity, if less than the "mapped watermark" percent of ram is mapped ram (ie applications). The normal system is to aggresively start scanning ram once it is completely full. The benefits of this are:
1. Allocating memory while ram is being lightly scanned is faster and cheaper than when it is being heavily scanned.
2. There is usually some free ram which tends to speed up application startup times.
3. Swapping is an unusual event instead of a common one if you have enough ram for your workload.
4. It is rare for your applications to be swapped out by file cache pressure.
Disadvantage: Less file cache.

The mapped watermark is configurable so a server for example might be happy to have a lower mapped percentage. The default is 66 and a server might like 33

echo 33 > /proc/sys/vm/mapped
This removes the swappiness knob entirely and deprecates all my previous vm hacks (autoregulated swappiness, hard swappiness, kiflush).

Sun Aug 22 20:29:56 EST 2004
1g lowmem?
Many machines now have exactly 1Gb ram and the standard memory split on i386 does not allow you to use more than 896Mb ram without enabling high memory for at least 4Gb. The problem is that this incurs an overhead whereas we can simply change this split with this patch to allow i386 architectures to use up to 1Gb ram without enabling highmem. This is configurable if HIGHMEM is disabled.

Fri Jul 2 20:48:57 EST 2004
Isochronous scheduling?
Isochronous scheduling (or guaranteed time scheduling) is an alternative to real time scheduling that can be used without root privileges. SCHED_ISO tasks start at effectively better priority but drop priority faster, guaranteeing relatively low latency each time they wake up, but still not allowing a normal user to completely starve a system. This is good for very latency intensive tasks - video capture, video playback, audio playback etc. You can set a task as SCHED_ISO using the schedtools utility. eg: ' schedtool -I -e "streamer ..." ' will start the video capture application streamer as ISO. Alternatively if you start an application that tries to get real time scheduling but you do not have root privileges, it will automatically be made SCHED_ISO.

Sun Aug 15 23:05:51 EST 2004
Server usage?
There is a server specific patch available in the patches directory.
The staircase scheduler includes two special sysctl settings which allow you to optimise it's behaviour for different workloads

echo 0 > /proc/sys/kernel/interactive
will disable interactive tasks from having bursts, thus being even stricter about nice levels (suitable for non gui desktop usage or a server)
echo 1 > /proc/sys/kernel/compute
makes round robin intervals much longer, delays task preemption and disables interactive mode to optimise cpu cache usage - suitable for computational intensive tasks. Other recommended settings for a server are 0 for mapped. You can set most of these in your sysctl.conf file with these options:

Sat Mar 27 02:24:42 2004
Staircase scheduler?
This is a complete rewrite of the scheduler policy for normal tasks built on top of the O(1) scheduler. The aim was to make a very lean simple but effective design scheduler that is intrinsically interactive and responsive instead of modifying an existing design with tweaks to make it interactive.

Wed Feb 18 23:13:50 2004
GPG signing?
Good idea. I've started signing my full patches and my pubkey can be found at the bottom of this page. The signature for full patches can be found in the same directory as the full patch.

Thu Feb 5 20:54:45 EST 2004
Supermount is a way of having removable media mount without ever needing to do a mount/umount when you change cd or floppy etc. You can make a supermount entry in fstab like so and it only needs to be mounted at bootup:

none	/mnt/cdrom	supermount	dev=/dev/hdc,fs=auto	0 0

Thu Feb 5 15:21:36 EST 2004
Are these only good for desktops?
There are now server specific improvements in -ck.

Thu Feb 5 15:19:51 EST 2004
Why don't my real time tasks become isochronous?
Some applications are too smart for this and detect whether they can be set to true real time scheduling, and if they fail they refuse to start or set the policy.

Tue Feb 3 13:40:58 EST 2004
Batch scheduling?
Batch scheduling allows tasks to only use cpu time if the cpu is idle, rather than a proportion of cpu usage that "nice" does. This is useful for distributed computing clients like setiathome. To set a task as SCHED_BATCH you need to use the schedtools utility.

Tue Feb 3 13:26:37 EST 2004
Should I use 2.4 or 2.6?
I recommend everyone move to 2.6 as soon as they can. It is stable and safe enough for everyone now and should outperform 2.4 in almost any setting. My interactivity patches are in the mainline 2.6 kernel.

Tue Feb 3 13:25:35 EST 2004
What happened to the 2.4 patches?
All 2.4 patches now kindly maintained by Eric Hustvedt
Take me to the new homepage of the 2.4 ck patchset.

Public gpg key: pubkey.asc

You are visitor number
hit counter
to one of my pages

Feel free to contact me with comments, questions or suggestions;
mail to : kernel at kolivas dot org
instant messaging (jabber): kernel at kolivas dot org. I am currently: Jabber 
IRC: #ck

Last updated: Tue Jan 18 11:40:19 2005