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

Show parent comments

0

u/[deleted] Nov 19 '10

[deleted]

2

u/bonzinip Nov 19 '10

As an end user, why exactly should I care about some scheduler magic deep in the bowels of the system?

Because it's not generic. It does wonders if you run compilations from a terminal, but not if a program runs "make > /tmp/blah.txt".

It's policy, and policy belongs in things such as gdm (or systemd) or gnome-terminal, not in the kernel.

-1

u/DPyro Nov 19 '10

So now every UI frontend must implement its own scheduler policy?

The current scheduling system for desktop Linux just sucks, period.

3

u/bonzinip Nov 19 '10

Yes, because these frontends are all different, so these policies are also different even though they share the basic idea.

If you implement it in systemd, every console (session) gets a fair share of the CPU. If you implement it in the desktop, every app in the session gets a fair share of the CPU within what is allotted to the session. If you implement it in gnome-terminal, every tab gets a fair share of the CPU within what is allotted to gnome-terminal by the desktop. And so on. Every application that needs to subdivide its share of the CPU must implement the policy.

Within the kernel, you can only make a simple per-tty policy, which only works in a very specific case ("the desktop will not get less CPU than what each tty will get"). For example, it will not work if you have mplayer in one window and an ffmpeg frontend on the other. It makes no sense, except that it affects Linus's workflow so he likes it.