Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

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.
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."
+ -
story

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
More
Loading... please wait.
  • by Anonymous Coward on Saturday July 28 2007, @03:46PM (#20025457)
    As it seems many others don't agree to his opinions of Con, http://lkml.org/lkml/2007/7/27/426 [lkml.org]
  • by MoOsEb0y (2177) on Saturday July 28 2007, @03:49PM (#20025487)
    What do CFS and SD stand for in this case? The summary and linked articles do not describe this.
  • by acidrain (35064) on Saturday July 28 2007, @03:51PM (#20025491)

    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.

    • by Anonymous Coward on Saturday July 28 2007, @05:32PM (#20026377)
      From the discussion it seems that Con Kolivas tried very hard to do what you're describing and ultimately had to tell off a single guy who kept harassing him after receiving much, much reasonable treatment and accomodation. Businesses do this all the time.

      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.
    • by acidrain (35064) on Saturday July 28 2007, @05:32PM (#20026379)

      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.

  • by Anonymous Coward on Saturday July 28 2007, @04:28PM (#20025811)
    It's an interesting set of emails. In addition to admitting that he actually didn't have any problem with the SD code, Linus points out that he made a gut call that Con is difficult to deal with without even looking into it because, apparently on near religious grounds, he doesn't believe in reading "specialized" mailing lists. What i find of concern is that he'd express such strong opinions about people basically without having even spent an hour or two browsing some list archives. Further, he seems perfectly aware that he may have heard just one side of the story, and yet he STILL doesn't feel he needs to look into it further or to soften his view? WTF ?

    Has Linux kernel development always been this ... arbitrary ?

    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)

    by rm999 (775449) on Saturday July 28 2007, @04:37PM (#20025901)
    Why can't there be a flag that determines what scheduler is used at runtime, with both schedulers built into the kernel? I thought the whole point of Linux is that it is customizable and modular - I know this doesn't necessarily apply to the kernel, but why not?

    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)

      by MBCook (132727) <foobarsoft@foobarsoft.com> on Saturday July 28 2007, @05:10PM (#20026207) Homepage

      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).

    • Re:Nerds (Score:5, Funny)

      by kcbanner (929309) on Saturday July 28 2007, @03:35PM (#20025377) Homepage Journal
      Everyone except you.
      • Re:Nerds (Score:5, Insightful)

        by Tadrith (557354) on Saturday July 28 2007, @04:31PM (#20025837) Homepage
        That's not really fair. Slashdot pretty much covers all things science, be it computer science, or quantum physics. There are frequently articles posted which I, being in the field of computer science, do not necessarily understand or comprehend. I'm not going to tell all of the quantum physicists out there that "slashdot is not the place for them" because Slashdot IS for them. While it might have a technical slant to it, I think it's a place for anyone more interested in hearing news of advancements in various scientific fields, rather than what prison Paris Hilton is going to next.

        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.
          • Re:Nerds (Score:5, Insightful)

            by tloh (451585) on Saturday July 28 2007, @06:48PM (#20026959)
            Furtunately, you're offering just an uninformed (and trivial at that) opinion. Unfortunately, you opinion seems to resonate with a large segment of similarly narrow-minded slashdot users. It is particularly tragic when folks here gravitate toward one steep world view without any desire to explore anything else outside of their comfort zone. It is a good thing that vocal narrow-minded elitist views (irritating as they are) are easy to ignore. The fact that diverse stories make it onto slashdot for all to discuss speaks volumes about that kind of site Slashdot actually is. We choose which stories we wish to participate in. The reality is that no one person (or even groups of persons) gets to define what slashdot is or isn't. Instead of helping to insulting others for not knowing much about the inner workings of the kernel, wouldn't it be more instructive to educate them on a subject which you (presumably) are more knowledgeble of? Instead of pushing your own agenda on a public community, why not take the time to look around and listen to what others may have to offer and then make the effort to make *your* contribution to other who need it? Please understand, I am not trying to attack you personally. I'm sure you're a decent upstanding guy. But the perspective of the opinion you've just expressed comes from a direction that hails from the most unsavory part of this great community, one that insults inteligent people and gives us all a bad name.
    • by Anonymous Coward on Saturday July 28 2007, @03:53PM (#20025513)
      I'm sorry but the flame wars over whether you call it zee eff ess vs. zed eff ess would make the vi vs. emacs flamewar look like a watergun fight. It would likely tear the Linux project apart as radical Zeddites suicide bomb the Zee Alliance.
      • Have you improved it to the point that when the system is borderline out of main memory or has a moderately high load average it actually *works* as a desktop system?

        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.
        • by TheRaven64 (641858) on Saturday July 28 2007, @05:24PM (#20026329) Homepage Journal

          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
          FreeBSD currently has two schedulers:
          • 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).

          • Re:good for you (Score:5, Informative)

            by QuoteMstr (55051) <dan.colascione@gmail.com> on Saturday July 28 2007, @05:24PM (#20026331)

            Since Linux is released under the GPL, every module must be under GPL compatible licenses, irrespective of whether they contain, or depend on, any GPL'd code.


            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.
      • by irwiss (1122399) on Saturday July 28 2007, @04:20PM (#20025747)
        "If a scheduler makes games better but hurts general server performance..."

        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]
      • by TheRaven64 (641858) on Saturday July 28 2007, @05:48PM (#20026523) Homepage Journal
        There's nothing wrong with having multiple schedulers in the tree. FreeBSD has two. 4BSD is stable, provides excellent throughput and is ideal for server workloads. ULE is newer, less tested (only been in use for about three years), and much better for latency-sensitive workloads, such as desktops. Both are actively developed. Users can pick the one they want as a compile-time option (4BSD is the default, since it has a decade more testing, and FreeBSD users tend to prefer 'stable' to 'shiny').

        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.

    • by Anonymous Coward on Saturday July 28 2007, @04:32PM (#20025855)
      I think the apparent rudeness stems from something deeper than a mere incomplete mastery of english.

      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)
      • by drerwk (695572) on Saturday July 28 2007, @06:10PM (#20026687) Homepage
        I had the pleasure of visiting Helsinki for work for 6 weeks in deep winter. The Finns are terrific. My favorite mannerism is when you get bumped on the sidewalk which is of course very icy, in the morning walk to work crowd, and fall on your behind. The polite response is a half laugh/cough "Ho!". No help up, no sorry, just "Ho!". At first, when it was me, I thought it was personal and rude. But I saw some poor lady get exactly the same treatment. Everyone was treated the same.

        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
    • I must say though, that I excuse him because he produces, [or helps produce] a very useful product on the world today. That is the Linux kernel.

      You're going to love this Theo guy, then.

      I keed, I keed.

    • by Anonymous Coward on Saturday July 28 2007, @04:35PM (#20025877)
      Whatever way you want to paint it, that's exactly what he did.

      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.
    • by arivanov (12034) on Saturday July 28 2007, @04:46PM (#20025991) Homepage
      Well...

      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.
    • by Anonymous Coward on Saturday July 28 2007, @06:18PM (#20026739)
      This is a nonsense idea of a way of life. Life's too short to carry on with a task that is thankless, has lost its enjoyment, and has taken a toll on your health and relationships. Have you even read Con's side?

      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.