Introduction to the lck patchset (formerly the ck patchset)

These are patches designed to improve system responsiveness for the 2.4 kernel series. Thanks go to Con Kolivas and all the real kernel developers who made them.

NOTE: As of 2.4.25, the XFS filesystem is available in the stock kernel, so the patch is no longer necessary. Additionally, the 2.4 ck patchset will now be know as the lck patchset, in order to reduce confusion with the 2.6-ck patchset.

top

Patches

Complete patches:
The full patch against 2.4.34: patch-2.4.34-lck1.bz2
Compute server kernel: patch-2.4.22-cck3.bz2

Component patches, APPLY IN NUMERICAL ORDER:

Performance patches:
Base lck contains the batch O(1) scheduler, kernel preemption, low latency and CK interactivity: 010-lckbase.diff.bz2
Read Latency2: 011-readlatency2.diff.bz2
RL2 Desktop Tuning (leave this out or back it out if using on a server): 012-rl2dt.diff.bz2
64-bit jiffies: 013-j64.diff.bz2
Variable HZ setting: 014-vhz.diff.bz2
Extra feature patches:
Supermount-NG v1.2.11a: 020-supermount-1.2.11a.diff.bz2
Bootsplash v3.0.7: 021-bootsplash-3.0.7.diff.bz2
File system extended attribute support v0.8.73: 030-xattr-0.8.71.diff.bz2
POSIX ACLs v0.8.73: 031-acl-0.8.71.diff.bz2
NFS ACL support v0.8.73: 032-nfsacl-0.8.71.diff.bz2
ACL security attribute support v0.8.73: 033-aclsec-0.8.71.diff.bz2
new NTFS file system v2.1.6b: 034-ntfs-2.1.6b.diff.bz2
Alternative extras not included in the full -lck patch:
grsecurity 2.1.6 (requires 64-bit jiffies) (NOT UPDATED YET): 101-grsecurity-2.1.6.diff.bz2

Patch Archives

Older versions of the patchset will be retained in the archives for use when upgrading to the latest kernel is not possible.

top

Patch documentation

Most of these things are not well documented, but these are links to the sources of the original patches or ideas.

top

Benchmarks

Try Con's contest benchmark - Last results here:2.4.20 v 2.4.20-ck3 aa / rmap

top

FAQ

Who is maintaining this patchset now? Why?

My name is Eric Hustvedt. I've been using linux since 1.2.13, and the ck patchset since 2.4.20-ck1. I'm a software engineer by trade.

I offered to maintain this patchset because I felt that it will remain useful to many linux users, even after 2.6 is released. Additionally, I felt that it would be a good way for me contribute back to the linux community.

I can't start X with the nvidia binary module.

You're using too restrictive a grsec policy; try a lower setting or disable it entirely.

What is the cck patchset as well?

This is a modified scheduler designed to maximise cpu throughput for cpu intensive tasks and is designed for a compute server; this would perform badly on a desktop but is good for clusters and grid computing. See also Nur Hussein's kernel patch page for additional patches including checkpointing.

My machine fails to complete updatedb!

Add "supermount" to the PRUNEFS line in /etc/updatedb.conf.

What happened to the ckvm?

Con didn't have the time to maintain it well enough. I may look into reintegrating it in the future.

Renicing X?

Many distributions (eg Mandrake) start X by default at a nice of -10 to make it more responsive. This is a workaround for the old scheduler limitations and the new scheduler makes this unnecessary, and may actually promote audio skipping with this kernel. Each distribution may do this at different places but commonly in the file /usr/lib/X11/xdm/Xservers there will be a line that looks like this

:0 local /bin/nice -n -10 /usr/X11R6/bin/X -deferglyphs 16
change it to:
:0 local /usr/X11R6/bin/X -deferglyphs 16

Gustavo Franco offered these instructions for how to do it on Debian:

# dpkg-reconfigure xserver-common
Manage X server wrapper configuration file with debconf? yes
Select what type of user has permission to start the X server. 2
Enter the desired nice value for the X server to use. 0
To check "cat /etc/X11/Xwrapper.config".

Interactivity update?

I've rewritten a new interactivity patch for the O(1) scheduler which makes it much less likely for audio to skip at high loads, and maintains X interactivity, without having to decrease timeslices.

Batch scheduling?

Batch tasks are treated by the kernel as ultra low priority and will always be preempted by any normal task. Unlike normal low priority tasks, when other tasks want cpu time, batch tasks will use no time at all. This is ideal for long running cpu intensive tasks that you don't want to have priority when you are using your machine (eg setiathome, dnetc, mprime etc.) Any task that is set to nice 19 will (2.4.21-ck1+) be scheduled as batch or you can manually set a task as batch using the schedtool utility.

Desktop tuning?

Changes to the default settings for I/O, for optimum responsiveness & interactivity.

What do you recommend?

Use the full patch for a desktop. Use separated patches as you need them for other systems.

What do you run on your desktop?

The full patch with ext3.

I'm running a - insert server type here - and what to use your patchset. What should I use?

Try all the patches you need without the Desktop Tuning patch, and probably disable preempt.

PCMCIA Breaks!

It doesn't cope with the variable Hz so use the split patches and leave out the 014-vhz.diff.bz2 patch.

I have Highmem and IDE Raid and I get a bug on booting your kernel!

2.4.24-ck1 and later patchsets incorporate a bugfix in the highmem code which should fix the issues with IDE RAID crashing. This has been a known issue with preemption and the IDE code getting preempted in an interrupt routine (a Very Bad Thing™).

Is 1000Hz more overhead than 100Hz?

Yes, definitely, but only a tiny amount.

If you change the Hz, use a multiple of 100. Keep in mind that there really is no point going above 1000 Hz.

Why XFS?

It is included by popular request. Con's preference is reiserFS which has been shown to make a more responsive system than other FS (and has other advantages). I'm currently running ext3 on my primary machine, mostly because it was originally ext2 before reiser was stable.

Why grsec?

By popular request. I don't use it.

AA vs. RMAP?

They are incompatible with each other. As of 2.4.23, substantial portions of the AA VM subsystem have been integrated into the stock kernel. Some people prefer the rmap or AA VM, so I offer them as an alternative.

My RAM is full all the time!

This is a good thing as RAM is very fast and anything cached in RAM is faster accessed when needed than by reading it from disk.

Software Suspend (SWSUSP)?

Nope, sorry.

NPTL?

Too much work sorry, I won't be including it any time soon.

LM Sensors?

You can just make modules for this after compiling the kernel. Download it from lm-sensors.

ALSA Sound?

You can just make modules for this after compiling the kernel. Download it from Alsa Project.

What about kernel version ***pre* or ***rc*?

I only work on stable kernel releases to minimize my workload and try my best to release stable and safe patches.

How about including - insert random addition - patch to your patchset?

I will happily consider adding patches that people send me.

I want more documentation about - insert patchname here -.

Most of these patches I didn't write myself so it would be presumptious of me to write documenation for them. I will endeavor to provide working links to available documentation for each patch that is included in the patchset.

Kernel Configuration?

Enable preemptible kernel and low latency. The "control low latency with sysctl" is not needed and will only disable low latency unless you manually enable it after bootup.

SuSE:

SuSE's style of boot logging doesn't work with the vanilla kernel. SuSE is using a kernel patch called TIOCGDEV, which can be found in Joerg Prante's patchset

top

Notes:

This patchset will incorporate the performance patches I merge when I think they're cool, and I will add my own custom changes as I create them.

I will apply the same patches to newer stable kernels as they're released if I can get them to work.

Success has been reported with most recent versions of gcc. As of 2.4.28, a number of minor changes for gcc 3.4.x compatibility have been integrated into the vanilla kernel. I have endeavored to make similar changes in my patchset, but I may have missed some. Please let me know if you come across any issues.

Con uses this kernel patch on his home workstations, a laptop, and a few gateway boxes and they have all proven to be very stable. People have reported happily running production servers with it as well.

It will only patch against a plain kernel; not a heavily patched kernel like the mandrake one.

Feel free to contact me with comments, questions or suggestions.