Linux has always been the champion in terms of speed, maybe that is why it powers 90% of the world’s supercomputers. The speed is mostly seen on servers rather than desktops, but a new a patch has appeared that brings a huge speed boost to the desktops.

The Patch

The patch by Linux kernel developer Mike Galbraith which adds a mere 233 lines of code to the Kernel’s scheduler, cuts the desktop latency by a factor of ten!

The patch has been praised by Linus himself. He Wrote

I’m also very happy with just what it does to interactive performance. Admittedly, my “testcase” is really trivial (reading email in a web-browser, scrolling around a bit, while doing a “make -j64” on the kernel at the same time), but it’s a test-case that is very relevant for me. And it is a _huge_ improvement.

It’s an improvement for things like smooth scrolling around, but what I found more interesting was how it seems to really make web pages load a lot faster. Maybe it shouldn’t have been surprising, but I always associated that with network performance. But there’s clearly enough of a CPU load when loading a new web page that if you have a load average of 50+ at the same time, you _will_ be starved for CPU in the loading process, and probably won’t get all the http requests out quickly enough.

So 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”.

What does it do?

Explain how his patch works Mike wrote

Each task’s signal struct contains an inherited pointer to a refcounted autogroup struct containing a task group pointer, the default for all tasks pointing to the init_task_group. When a task calls __proc_set_tty(), the process wide reference to the default group is dropped, a new task group is created, and the process is moved into the new task group. Children thereafter inherit this task group, and increase it’s refcount. On exit, a reference to the current task group is dropped when the last reference to each signal struct is dropped. The task group is destroyed when the last signal struct referencing it is freed. At runqueue selection time, If a task has no cgroup assignment, it’s current autogroup is used.

Simply, this patch works by enabling the system to automatically create task groups per TTY from what I understand.

Don’t believe me?

No problem, Phoronix has a put two videos showing the desktop running the latest Kernel git snapshot, glxgears, a web browser, a HD video clip and compiling a kernel with 64 jobs here.

It is a day and night difference!

via Computerworld

kernelupdates Linux