What a difference 233 lines of code can make.
Thatâ€™s the size of a small new patch to the LinuxÂ kernelâ€˜s scheduler that has been found to reduce the average latency of the desktop by about 60 times. Itâ€™s a small patch with a really, really big gain forÂ desktop users of the open source operating system, in other words.
Though not yet merged into the mainline kernel, the new patchâ€“written by Linux kernel developer Mike Galbraithâ€“has already received high praise from Linux creator Linus Torvalds himself.
â€œI have to say that Iâ€™m (very happily) surprised by just how small that patch really ends up being, and how itâ€™s not intrusive or ugly either,â€ Torvalds wrote Monday in anÂ e-mail. â€œIâ€™m also very happy with just what it does to interactive performanceâ€¦. It is a _huge_ improvement.â€
Web pages, in particular, load â€œa lot fasterâ€ following the patch, Torvalds noted. â€œI think this is firmly one of those â€˜real improvementâ€™ patches. Good job. Group scheduling goes from â€˜useful for some specific server loadsâ€™ to â€˜thatâ€™s a killer featureâ€™.â€
60 Times Faster
Essentially, theÂ patch works by automatically creating task groups per TTYâ€“or input/output deviceâ€“so as to improve desktop interactivity under heavy loads. The feature is enabled from boot by default, but it can be turned on or off on the fly.
Below is the video of the LinuxÂ desktop when running the Linux Git kernel and the patch in question was applied but the auto-group scheduler was disabled via its sysfsÂ interface.