r/programming • • Nov 19 '10

Alternative To the 200-Line Linux Kernel Patch

http://www.webupd8.org/2010/11/alternative-to-200-lines-kernel-patch.html
40 Upvotes

13 comments sorted by

View all comments

3

u/[deleted] Nov 19 '10

Can someone explain to the ignorant, what does all that shell wrangling accomplish? I take it it writes something to some special device that tells the kernel to change something inside itself. But what?

8

u/[deleted] Nov 19 '10

The magic keyword here is "Control groups". It's basically a mechanism to group different tasks/processes into a so called cgroup which enables you to control their resource usage. This in turn can be used to tell the scheduler to prioritize certain tasks, which results into a better response time. The patch essentially automates this within the kernel.

1

u/[deleted] Nov 19 '10

Thank you! So does the patch create intelligent and rational control groups? Or is something dumb? If the patch uses some kind of heuristic to make a good default choice for the control group creation, I think it's a good idea. What do you think?

4

u/[deleted] Nov 19 '10

So does the patch create intelligent and rational control groups?

Not really. According to the article that was discussed here on reddit:

The patch being talked about is designed to automatically create task groups per TTY in an effort to improve the desktop interactivity under system strain.

As far as I understand it, everything that is started from terminal (TTY) runs with a lower priority in regard to CPU usage. The end result is that the other tasks (like the desktop stuff) react fast even when the system is under load by a terminal run process.