Slashdot Log In
Torvalds Explains Scheduler Decision
Posted by
kdawson
on Sat Jul 28, 2007 03:24 PM
from the it's-the-guy-not-the-code dept.
from the it's-the-guy-not-the-code dept.
Firedog writes "There's been a lot of recent debate over why Linus Torvalds chose the new CFS process scheduler written by Ingo Molnar over the SD process scheduler written by Con Kolivas, ranging from discussing the quality of the code to favoritism and outright conspiracy theories. KernelTrap is now reporting Linus Torvalds' official stance as to why he chose the code that he did. 'People who think SD was "perfect" were simply ignoring reality,' Linus is quoted as saying. He goes on to explain that he selected the Completely Fair Scheduler because it had a maintainer who has proven himself willing and able to address problems as they are discovered. In the end, the relevance to normal Linux users is twofold: one is the question as to whether or not the Linux development model is working, and the other is the question as to whether the recently released 2.6.23 kernel will deliver an improved desktop experience."
Related Stories
[+]
Why Linux Has Failed on the Desktop 995 comments
SlinkySausage writes "Linux is burdened with 'enterprise crap' that makes it run poorly on desktop PCs, says kernel developer Con Kolivas. Kolivas recently walked away from years of work on the kernel in despair. APCmag.com has a lengthy interview with Kolivas, who explains what he sees is wrong with Linux from a performance perspective and how Microsoft has succeeded in crushing innovation in personal computers."
[+]
IT: Torvalds On Pluggable Security Models 216 comments
eldavojohn writes "The KernelTrap highlights an interesting discussion on pluggable security models including some commentary by Linus Torvalds. While Torvalds argued against pluggable schedulers, he's all for pluggable security. Other members were voicing concerns with the pluggable nature of the Linux Security Model, but Torvalds put his foot down and said it stays. When asked why his stance was different between schedulers and security, he replied, 'Schedulers can be objectively tested. There's this thing called 'performance,' that can generally be quantified on a load basis. Yes, you can have crazy ideas in both schedulers and security. Yes, you can simplify both for a particular load. Yes, you can make mistakes in both. But the *discussion* on security seems to never get down to real numbers. So the difference between them is simple: one is hard science. The other one is people wanking around with their opinions.'"
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Linus as the benevolent dictator again (Score:5, Insightful)
Re:Linus as the benevolent dictator again (Score:5, Insightful)
Parent
For those of us who are not kernel hackers, (Score:5, Interesting)
Re:For those of us who are not kernel hackers, (Score:5, Informative)
CFS = completely fair scheduler
SD = staircase deadline.
That probably didn't clarify anything :/
Parent
seeming to care is a big deal (Score:5, Insightful)
Having had my fair share disagreements with customers over technical issues, it just isn't worth trying to "win." The damage to your working relationships is still there even if you are shown to be 100% right. Try and help them address their problems as much as you possibly can, while trying to compromise as little as possible of the design. It's called diplomacy, and it's the difference between being given huge amounts of responsibility, and wanting to quit. You don't even have to agree with them, you just have to make them think you care.
Finally, it is common for programmers to try to avoid a subset of the problems in an area because it gives them the ability to write something "correct." Certainly a very satisfying experience for a programmer. However, that is exactly why it can be a bad idea to let a programmer rewrite a messy module. Very soon you can find the users of that module asking why a laundry list of things don't work anymore and an idealist developer trying to argue that they shouldn't... And it is exactly those idealists that like to rewrite working code. Not that major rewrites are bad, just that they have to be approached by someone mature enough to both expect a list of things they overlooked, and be willing to work with customers to resolve them.
Re:seeming to care is a big deal (Score:5, Insightful)
It also seems that Linus was tricked into torpedoing Con by people who gave him a very warped account of Con's actions. Either Linus got played and turned into a political tool of some anti-ck people, or he's making it appear that way to seem like an innocent victim. Linus evidently screwed up big-time here... but that should be expected from time to time.
Parent
ok, one step further then (Score:5, Informative)
Whether Con was aware of it, when he tried to integrate into mainline Ingo was his main customer. Specifically the person he was trying to deliver work to. And Con committed the cardinal sin of telling a customer that the customer was wrong about what he wanted. Even if Ingo were too coked up to operate a keyboard reliably and had it all wrong, trying that never seems to work.
Did Con gain anything by refusing to re-introduce the hack to get X working the way it had previously under load? Even if he'd just put in a #define that allowed it, and then spent the next year arguing to take it out, there wouldn't have been this breakdown.
Parent
tfa shows "interesting" view into Linus's outlook (Score:5, Insightful)
Has Linux kernel development always been this
From TFA (actually form the quoted emails) after several mails where Linus has been bashing this Con Kolivas guy for not taking feedback and being argumentative, and then offers some statements about the virtues of a good maintainer some guy "Kasper Sandberg" asks him:
"Okay, i wasn't going to ask, but i'll do it anyway, did you even read the
threads about SD?"
to which Linus responds:
"I don't _ever_ go on specialty mailing lists. I don't read -mm, and I
don't read the -fs mailing lists. I don't think they are interesting.
And I tried to explain why: people who concentrate on one thing tend to
become this self-selecting group that never looks at anything else, and
then rejects outside input from people who hadn't become part of the 'mind
meld'.
That's what I think I saw - I saw the reactions from where external people
were talking and cc'ing me.
And yes, it's quite possible that I also got a very one-sided picture of
it. I'm not disputing that.
"
Why not both? (Score:5, Interesting)
I know very little about operating systems, schedulers, and maintaining large projects, so please excuse any ignorance in my post
Re:Why not both? (Score:5, Informative)
Linux doesn't support that, as far as I know. There are variables you can tune though. More on this later.
Something like that is very risky. Where as a filesystem can be used or not, and the code is only hit when accessing it, the scheduler is used constantly. If the scheduler could be switched at runtime, that means that either you have to have some kind of if statement on every scheduler entry point, or hide it all behind a pointer and a structure. Either one isn't as efficient as just having it hard wired in. You also have the complexities of being able to hand stuff off from one scheduler to another. Also, debugging get much harder (you have problem with slowness X, now which of the 3 schedulers are you using? Which version? What are the variables set to?).
As for selectable at compile time, that means you have a have a well designed interface that lets you swap things out. That means it either has to be generic, or would favor one scheduler to the detriment of others. Sometimes this tradeoff is acceptable, sometimes it isn't.
Now my understanding on this is that Linux doesn't support plugging in full schedulers. There were patches for that a few years go. Linus and others (Ingo especially, I think) said no, and the patches never made it in. Recently a system was developed that would allow a part of the scheduler to be plugged in. This way it could be better tuned for different workloads, without the full detriment of a full pluggable scheduler. This was done recently, and they were called out on this flip and explained quite well how they were a little hard, and this was a little different.
Go read LWN [lwn.net]'s kernel pages. They talked about this in the last month or so, so it should be available to non-subscribers by now (although you should subscribe, they're great).
Parent
Re:Nerds (Score:5, Funny)
Parent
Re:Nerds (Score:5, Insightful)
For that matter, even when I don't understand what an article is talking about, I am still usually more than interested to read about it.
Parent
Re:Nerds (Score:5, Insightful)
Parent
Re:good for you (Score:5, Funny)
Parent
Its the desktop stupid! (Score:5, Interesting)
E.g. when Firefox is consuming 65-70% of main memory and slower than #%#$ and you know it is waiting on swapped out pages and your swap rate is measured in the dozens to hundreds rather than hundreds to thousands (on vmstat)? (I mean really, how can one take an operating system seriously when only memory is at 100% and not CPU + memory + Disk I/O?)
The real issue, for those who have read comments that Con has made in interviews, seems to be the lack of concern on the part of most of the "in-crowd" Linux developers for performance on the desktop. In part this seems driven by the fact that the people who actually get paid to maintain Linux, benchmark it and "improve" it only care about its performance in server farms and *not* on the individual desktop. I will weigh in on the side of desktop user out there (that wants the Linux sitting beneath their desk to devote its every waking minute to making *them* happy) by saying that if my mplayer "hangs" in the middle of a song (only to continue with a loud burst of noise 10 seconds later) when the CPU is busy with "nice -19" processes, my Firefox browser takes half a minute to scroll a page or open a screen) when memory is tight, and it takes minutes to bring up a tab or minimized program I haven't touched in 3 days and return them to a functional state then the operating system *Has a PROBLEM*.
Con was very clear in his interviews that the problem is the lack of caring about *desktop* performance. Given my comments in the previous paragraph -- some of these areas may be very difficult to benchmark and as a result one is left with nothing but handwaving and loud voices when it comes to discussions about whether the problem exists and how it should be fixed.
I will say this, in the mid-'90s I used X-windows under Unixware on *Pentium 1s* as a desktop machine. I now use X-windows under Linux on a Pentium 4 (with 5-10x more main memory) as a desktop machine. I would argue that my desktop user experience is as problematic now as it was then *despite* the hardware improvements. That IMO is what Con felt was the problem he was trying to address. That is what it would appear the core Linux developers may be failing to address. Con's points raised my awareness level to the extent that I actually went investigating to see whether there were open source distributions of the BeOS and/or Darwin (which is based on Mach) available since they are based on different OS architecture models and might be more end-user friendly [1]. I was hoping to find something I could run in a VM under Linux on my current hardware without major file system surgery. But I have little confidence that such an approach would fix core problems with the Linux scheduling and paging systems. I would *love* to see a real side-by-side comparison of Linux vs. FreeBSD for desktop users with an emphasis on how BSD scheduling, paging and swapping may be different (better?).
(And as a side note, I could care *zero* about the performance of Linux in file server applications!)
1. I did use both Nextstep (on Pentiums) and IRIX (on a R4000) for a while and found both to provide better end-user experience than Unixware (X) or Windows (95-98). I am disappointed that Linux barely manages to match those experiences given the hardware available nearly a decade later.
Parent
Re:Its the desktop stupid! (Score:5, Interesting)
- The old 4BSD scheduler has been tweaked a bit in the last decade, but is still fairly similar to the original. It is a high-throughput scheduler, which works well on servers and does okay on desktops.
- The newer ULE[1] scheduler is latency-focussed. It prioritises I/O-bound tasks and respects 'nice,' so is generally much better for desktop use, where a little throughput can be sacrificed for responsiveness.
I've been using ULE since the 5.x series, and it seems nice. It's been improved a lot since originally being integrated. It's hard to make a good benchmark for this kind of thing, because what you are really trying to optimise for is 'user experience.' The Windows scheduler has a trick where it prioritises the process owning the foreground window, hoping that the user's attention is on that window, so they get a perceived boost in responsiveness. Doing this on *NIX would require window manager cooperation.[1] ULE doesn't stand for anything, it was just chosen so the option in the kernel config file for adding it would be SCHED_ULE (SCHED_4BSD for the other one).
Parent
Re:good for you (Score:5, Informative)
That's not true [wikipedia.org]. Non-GPLed kernel modules are "tolerated" by the Linux kernel developers, and in principle, a ZFS module could be created and loaded with no problems, assuming it doesn't rely on GPL-only symbols. AFAIK, the VFS doesn't have many of those.
What can't happen under the CDDL is the ZFS code being included in the kernel source tree the same way XFS, ext3 and so on are. That doesn't mean you can't maintain and distribute a module separately! The only reason a ZFS module doesn't exist today is that nobody's gone through the trouble of creating one.
Parent
Re:Linus, Games are important! (Score:5, Informative)
IIRC that is the reason Con together with another person, whose name I can't
can't be bothered to look up, wanted to merge plugsched to which they got a
reply along the lines of "too much choice will split contributors" [kerneltrap.org] or some such
And then Ingo turns around on himself, and claims something along the lines of
"Oh okay, you should work on plugsched, may be it'll get merged" [kerneltrap.org]
Parent
Re:Linus, Games are important! (Score:5, Insightful)
The situation for Linux is even simpler, since hardly anyone actually uses the stock kernel. Most Linux users use a kernel supplied by a distribution, which is compiled with a specific set of options and typically a few hundred patches. If one scheduler is good for desktops, and one good for servers, then merge them both and let desktop-focussed distros pick one and server-focussed ones pick the other.
Parent
Re:I find him rather rude (Score:5, Informative)
Linus is (as I am) a Finn by birth. No matter how long he has been abroad, he still follows Finnish habits and speech patterns at least to a degree. And they differ significantly from the west european tradition. For example, small talk is considered unnecessary or even rude in some situations. Getting to the point is a virtue in any conversation. To someone not familiar with this pattern, it will sound unfriendly! It's a two-way street: to me many english speakers sound terriby smarmy and guarded.
Of course, Linus is apparently also rather clever. The downside of cleverness is for many having little tolerance for fools, real or percieved.
An AFC (Anonymous Finnish Coward)
Parent
Re:I find him rather rude (Score:5, Interesting)
During the same trip I saw the Gulf of Finnland freeze. First salt water body I've seen freeze. And the Finns were thrilled because now the drive to Tallinn was a mere 80 mi round trip, and the booze in Tallinn is tax free.
Ooksie isso olute kiitose...pardon my phonetic spelling
Parent
Re:I find him rather rude (Score:5, Funny)
You're going to love this Theo guy, then.
I keed, I keed.
Parent
Linus admitted to favoritism (Score:5, Insightful)
He believes that Ingo is a more reliable maintainer, so he chose Ingo's few-day old hack instead of Con's very mature and well tested scheduler.
Personally, I think that the person who is at fault here is Ingo, because he has a "Not Invented Here / By Me" mentality, and instead of developing Con's scheduler further, he totally objected to Con's work for ages (which prevented it from getting into mainline), and then suddenly saw the light and wrote his own quick hack based on the same design.
Ingo may be a good developer and maintainer, but he sure as hell isn't a friendly co-developer.
Parent
Re:Linus wins by default (Score:5, Insightful)
If we look at the core linux developers every single one of them has been flamed into a crisp by Linus on the average every few years (and some of them flamed back in turn). Every single one of them has had something turned down in flames and an alternative merged as well (in some cases Linus admitting that he made the wrong choice later). And I cannot recall anyone of them behaving like such a hissy primadonna.
Similarly, I have flamed people in a crips at work, I have been flamed back and I still work with this people 8+ years later. In some cases we have even come again to the same company and the same team to work together. It is just software, it is just a job and any code you have ever written can and would be ripped out by the project leader one day to be replaced by something else. Accepting this as a given is a sign of maturity. If you cannot do that, you are not mature enough to maintain a critical part of a software project. You should go away and play with toys in the sandpit for a while until you grow up.
Sorry, the guy does not get a bit of my sympathy.
Parent
Re:Linus wins by default (Score:5, Insightful)
There is no taking of balls home, just a clash with the monster egos of the Linux kernel. Don't question Con's maturity because he's made a decision to change his life. This in itself makes you sound seventeen and with no experience of life. There may be two sides to this story, so I won't make a judgement yet, but Linus has hardly shown himself to be broad and balanced in the past, has he?
The uncontrollable ego and senseless flaming that is associated with programming is nothing to be proud of and a block to new blood and new personality types (like Con's) getting involved, leaving us with this self-perpetuating industry of arrogant computer scientists attracting nothing but other arrogant computer scientists who are unmoved in by, and ignorant of, what their users want. Fine if you live in a bubble, but doomed by natural selection.
Parent