Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming Linux

Con Kolivas Returns, With a Desktop-Oriented Linux Scheduler 333

myvirtualid writes "Con Kolivas has done what he swore never to do: returned to the Linux kernel and written a new — and, according to him — waaay better scheduler for the desktop environment. In fact, BFS appears to outperform existing schedulers right up until one hits a 16-CPU machine, at which point he guesses performance would degrade somewhat. According to Kolivas, BFS 'was designed to be forward looking only, make the most of lower spec machines, and not scale to massive hardware. i.e. [sic] it is a desktop orientated scheduler, with extremely low latencies for excellent interactivity by design rather than 'calculated,' with rigid fairness, nice priority distribution and extreme scalability within normal load levels.'"
This discussion has been archived. No new comments can be posted.

Con Kolivas Returns, With a Desktop-Oriented Linux Scheduler

Comments Filter:
  • by Anonymous Coward on Sunday September 06, 2009 @04:35AM (#29330037)

    Why would the summary omit this precious bit of information?

  • great news (Score:5, Interesting)

    by amn108 ( 1231606 ) on Sunday September 06, 2009 @04:36AM (#29330045)

    Great news :-) Now, will the kernel people with Mr. Torvalds at their head, restart the whole debate on pluggable schedulers. Since his scheduler, as he says, degrades beyond 16 CPUs, better options already exists for servers where I am guessing CFS is used. So, he may be back, but the road ahead is still as steep?

    • Re:great news (Score:5, Insightful)

      by s4m7 ( 519684 ) on Sunday September 06, 2009 @05:34AM (#29330235) Homepage

      I think that's only going to be a good thing, because IMO the arguments against pluggable schedulers are weak. "we need the few people working on this to just make the core better for ALL CASES" is about the most valid i've heard, but linux is too broadly applied to force it to meet all cases. realtime, embedded, servers, desktop: i just don't think one scheduler can be shoehorned to maximize performance for all those. You wind up with a crippled scheduler that really only achieves maximum performance in at most one of those four domains. And the question of there being enough developer minds working on it? you can bet that more commercial enterprise will start throwing money at it when they can customize it for their domain.

      It's like the dynamic syscall argument in a way. without dynamic syscalls, the argument goes, all the 'fringe functionality' people have to think harder and have to integrate their stuff into the current syscalls/drivers/subsystems. (apologies ingo) however, without dynamic syscalls, all the "middle of the road" functionality people like hardware manufacturers, are unwilling to release drivers that they essentially have to ask customers to compile as a supported option.

      Both, IMO are cases of cutting off your leg to spite your foot.

      • by amn108 ( 1231606 )

        I agree. Linux is too large (in the classic meaning of the english word) to run on a single scheduler. But then again, what is a _single_ scheduler? If it means a facility that can plug and unplug schedulers at runtime, let us say switch between CFS (or something even more server oriented) and BFS as it detects server-desktop border patterns, then I guess both Mr. Torvalds and Mr. Kolivas are happy. And users are happy too. The rigid unexplained reason that "we only need ONE scheduler, period." however puts

        • Re:great news (Score:5, Insightful)

          by MrNaz ( 730548 ) * on Sunday September 06, 2009 @06:08AM (#29330313) Homepage

          I think anyone who cares and knows anything about this debate is hoping Linus sees the light and allows work to begin on pluggable schedulers. There are no definitive arguments against having pluggable schedulers, and plenty of formidable ones for them. I never really understood Linus' handling of Con in the past, I really hope that, this time round, the new BFS is given a fair assessment, and if it's found to be better under desktop use patterns, adopted for use in desktop distros.

          The idea that the Nokia N900 smartphone uses the same process scheduler as my now-dated laptop as well as my 8 core server is just silly.

          • Re:great news (Score:5, Interesting)

            by TheRaven64 ( 641858 ) on Sunday September 06, 2009 @09:01AM (#29331037) Journal
            Why does Linux not have pluggable schedulers already? You can choose the scheduler in FreeBSD by changing a compile-time option and in OpenSolaris and Xen by changing a boot-time parameter. I think HURD can swap them out at run time, but I only know one person who actually runs HURD, and he also runs other systems for real work. If your system already has clean interfaces for the scheduler, then making them pluggable at compile time is trivial and making them pluggable at boot time is only a small amount of effort (although a bit more to make sure this has no performance side-effects). If it doesn't already have clean interfaces to the scheduler, then it probably has more serious problems than the lack of plug-support.
            • Re: (Score:3, Insightful)

              by rtfa-troll ( 1340807 )

              Linus Torvalds has, for once, made pretty clear arguments against it. Various philosophical ones etc. but also several solid technical ones

              1. it's better to have one tested scheduler
              2. since the scheduler can be parametrised there's nothing to stop it scaling
              3. "nobody has come close" to providing a pluggable implementation which efficient enough

              See this email [lkml.org] and this one [lkml.org].

              The grandparent's statement that "here are no definitive arguments against having pluggable schedulers" glosses over the fact that Linus' argume

              • Re: (Score:3, Informative)

                by BhaKi ( 1316335 )

                Alternatively, maybe pluggability would have to be done with self modifying code which left no indirection in place?

                No. In most modern CPU architectures, schedulers are implemented by handling a timer interrupt. The address for the handling code is put in the interrupt vector table during kernel start-up. For implementing pluggable-scheduling, all you need to do is to change the contents of the interrupt vector table. Once that is done, scheduling happens the same way as when there's only a single scheduler. So no. It doesn't require self modifying code and it's not a performance overhead to have pluggable schedulers.

          • Re:great news (Score:5, Interesting)

            by gbjbaanb ( 229885 ) on Sunday September 06, 2009 @09:17AM (#29331159)

            OOh. I've just seen the 'thought for the day' at the bottom of the page:

            "One size fits all": Doesn't fit anyone.

            Even the gods of slashdot are getting in on the debate.

          • Re:great news (Score:5, Interesting)

            by macshit ( 157376 ) <snogglethorpe@gm[ ].com ['ail' in gap]> on Sunday September 06, 2009 @01:21PM (#29332983) Homepage

            I never really understood Linus' handling of Con in the past

            Linux kernel development is all about "playing well with others": a very important part of the process is being able to handle criticism constructively and fix the problems it addresses, or show that it is wrong; that's the way progress is made. You need to do this again and again and again. Most criticism is very technical and can be quite insightful, but can also be strong and relentless -- people will point out every single little flaw, and possible flaws, and unclear points, and whitespace inconsistencies, and... To be a successful linux developer you need to be able to deal with this constructively, and the more important and core the area you're dealing with, the more important this becomes.

            The impression I've gotten from reading various past "Con threads", is that while he tries in the beginning, Con doesn't deal well with this process; he can't keep his ego submerged, gets frustrated, and everything (perhaps including Con himself last time I read one of these threads) ends up unravelling. The same thing has derailed other big projects too (i.e., reiser4, when Reiser himself was still involved).

            It's a shame when this happens, but basically the process is more important that specific pieces of technology -- technology can be replaced, but the process is what makes linux as good as it is.

            • Re:great news (Score:5, Informative)

              by pthisis ( 27352 ) on Monday September 07, 2009 @03:28AM (#29337931) Homepage Journal

              The impression I've gotten from reading various past "Con threads", is that while he tries in the beginning, Con doesn't deal well with this process; he can't keep his ego submerged, gets frustrated, and everything (perhaps including Con himself last time I read one of these threads) ends up unravelling.

              Agreed; Con seems not to be able to work well in the process.

              e.g. Ingo ran a bunch of benchmarks on BFS and made a long post to LKML explaining his results, that, while critical of its performance on a series of benchmarks, bent over backwards to be very polite in tone, with things like:

              First and foremost, let me say that i'm happy that you are hacking the Linux scheduler again. It's perhaps proof that hacking the scheduler is one of the most addictive things on the planet ;-) ...

              General interactivity of BFS seemed good to me - except for the pipe test when there was significant lag over a minute. I think it's some starvation bug, not an inherent design property of BFS, so i'm looking forward to re-test it with the fix. ...
              I hope to be able to work with you on this, please dont hesitate sending patches if you wish - and we'll also be following BFS for good ideas and code to adopt to mainline.

              And Con responded with a very defensive and confrontational tone:
              I'm not interested in a long protracted discussion about this since I'm too busy to live linux the way full time developers do, so I'll keep it short, and perhaps you'll understand my intent better if the FAQ wasn't clear enough.

              Do you know what a normal desktop PC looks like? No, a more realistic question based on what you chose to benchmark to prove your point would be: Do you know what normal people actually do on them?

              Feel free to treat the question as rhetorical.

              Full exchange here:
              http://thread.gmane.org/gmane.linux.kernel/886319 [gmane.org]

              • Re: (Score:3, Informative)

                by smash ( 1351 )
                Well, he has a point.

                For desktop use, I doubt many users *care* whether or not they drop some percentage of throughput on interactive apps, if it means that processes actually run "properly" (eg, video playback, gaming, audio processing, etc).

                ingo benchmarking some abstract processes that no desktop user would actually run day to day merely reinforces con's point.

                Yes, con may have come off as a bit of an arse, but given his previous "do not contact me regarding kernel matters" posting to LKML, only to

                • Re: (Score:3, Insightful)

                  by Abcd1234 ( 188840 )

                  Well, he has a point.

                  So what? If you have a point, but you're being a dick about it, people are far less likely to notice. And given Ingo at least *tried* to be civil, the least Con could do is return the favour, rather than immediately becoming an offensive asshole. For example, he could've responded with:

                  "Well, recall, the purpose of the scheduler is to enhance desktop performance. Thus, I've designed it to favour low latency over high throughput, and as a result, it's not really surprising that, in

        • Does it even need to be a run-time option? A single installation will always run on the same hardware, more or less, so what's the point? Just make it a compile-time setting. Distros can decide which scheduler is right for them, or offer a choice of kernels with either one or the other.

          • Re: (Score:3, Interesting)

            by smoker2 ( 750216 )
            The hardware is not the point. The software is. I run a linux machine which I use both as a media and web server, and as my main desktop for web browsing, email, WP etc. A hard coded setup would not be useful there.

            While I'm here, why does the summary [sic] i.e. It is a contraction of 2 words and perfectly acceptable. And in case they were worried about repetition with the following words " it is ", i.e. means "that is" as in "that is to say" used with a pause in normal speech. You have to read the precedi
            • Re: (Score:3, Informative)

              by myvirtualid ( 851756 )

              ...why does the summary [sic] i.e

              Because the 'i' should have been capitalized since it was the beginning of a new sentence. Had Kolivas written "hardware, i.e." there would be no sic.

            • Re: (Score:3, Insightful)

              The sic is in the wrong spot.

              It reads "it is a desktop orientated scheduler". Note the topic subject is "desktop oriented scheduler".

              It should read "it is a desktop orientated (sic.) scheduler.

              • Re: (Score:3, Funny)

                by Anonymous Coward

                The sic is forward looking...

                - Peder

      • by Jurily ( 900488 )

        but linux is too broadly applied to force it to meet all cases. realtime, embedded, servers, desktop: i just don't think one scheduler can be shoehorned to maximize performance for all those.

        I thought scalability was the main strength of Linux as an OS. Perhaps it's time we did the same with the kernel. Just as you don't need CUPS if you don't have a printer, you don't need a scheduler scaling to 2^32 CPUs for a laptop.

  • Glory! (Score:5, Interesting)

    by CAIMLAS ( 41445 ) on Sunday September 06, 2009 @04:41AM (#29330067)

    May I be the first to say "amen"? I've been very dissatisfied with the 2.6 kernel and its schedulers on the desktop, CFS in particular. CFS seems entirely braindead for desktop use compared to the older schedulers in 2.4 and yes, even 2.2.

    A desktop machine needs to be, first and foremost, responsive. If it isn't, it's comparable to the cursor freezing and input taking several seconds to appear: on today's hardware, one might start to think "hey, did it freeze on me?" - completely unacceptable.

    Maybe it can be chalked up to the non-priority of X and video at the kernel level; I don't know. Whatever it is, it used to be better, on very pathetic (133MHz) hardware, while doing a lot more (and when such hardware was not all that powerful anymore, as well).

    My question is: is it in the kernel tree yet? Is this that 2.6.31 scheduler change I heard about earlier yesterday, or is it something Completely Different?

    Oh yeah, and which other scheduler's, if any, did this guy write?

    • Re:Glory! (Score:5, Interesting)

      by kav2k ( 1545689 ) on Sunday September 06, 2009 @04:49AM (#29330093)
      Citing the FAQ:

      Are you looking at getting this into mainline?

      LOL.

      No really, are you?

      LOL.

      Really really, are you?

      No. They would be crazy to use this scheduler anyway since it won't scale to
      their 4096 cpu machines. The only way is to rewrite it to work that way, or
      to have more than one scheduler in the kernel. I don't want to do the former,
      and mainline doesn't want to do the latter. Besides, apparently I'm a bad
      maintainer, which makes sense since for some reason I seem to want to have
      a career, a life, raise a family with kids and have hobbies, all of which
      have nothing to do with linux.
      • Re:Glory! (Score:5, Insightful)

        by BiggerIsBetter ( 682164 ) on Sunday September 06, 2009 @05:08AM (#29330175)

        No. They would be crazy to use this scheduler anyway since it won't scale to
        their 4096 cpu machines. The only way is to rewrite it to work that way, or
        to have more than one scheduler in the kernel. I don't want to do the former,
        and mainline doesn't want to do the latter. Besides, apparently I'm a bad
        maintainer, which makes sense since for some reason I seem to want to have
        a career, a life, raise a family with kids and have hobbies, all of which
        have nothing to do with linux.

        Which is not to say that it might not find it's way into the Ubuntu Desktop mainline patchset, for example. Sure it might not make sense for the mainline kernel, but it surely makes sense for a user focused distro like Ubuntu - they already have patched base and server kernels, so why not a genuine desktop targeted kernel?

        • Re:Glory! (Score:5, Informative)

          by Hurricane78 ( 562437 ) <(deleted) (at) (slashdot.org)> on Sunday September 06, 2009 @07:15AM (#29330541)

          What is that? You don't have the choice of scheduler in your kernel? I'm using the Zen sources [zen-sources.org], and I get to choose between least half a dozen schedulers, including other settings. I am certain that this scheduler will make it into that patchset, and that I will enable it, as soon as zen-sources-2.6.31 get installed on my system.

          After all this is Linux! Not some one-company-one-kernel monoculture!

        • Not only Ubuntu, but what about Openmoko, Maemo, Android, OLPC et al? Ok, we're probably not going to see patched Android kernels, but there seems like a lot of projects that could benefit from this, if it's as good as we're told it is.
      • by Jurily ( 900488 )

        The only way is to rewrite it to work that way, or
        to have more than one scheduler in the kernel. I don't want to do the former,
        and mainline doesn't want to do the latter.

        Who gives a fuck about mainline? If it's good, people will use it. And if more people use this than the default one, perhaps it's time to rethink some things.

    • Re:Glory! (Score:5, Informative)

      by Trepidity ( 597 ) <[gro.hsikcah] [ta] [todhsals-muiriled]> on Sunday September 06, 2009 @04:52AM (#29330111)

      My question is: is it in the kernel tree yet? Is this that 2.6.31 scheduler change I heard about earlier yesterday, or is it something Completely Different?

      No, and probably won't ever be, though perhaps some ideas will be borrowed.

      From his FAQ:

      Are you looking at getting this into mainline?

      LOL.

      No really, are you?

      LOL.

      Really really, are you?

      No. They would be crazy to use this scheduler anyway since it won't scale to
      their 4096 cpu machines. The only way is to rewrite it to work that way, or
      to have more than one scheduler in the kernel. I don't want to do the former,
      and mainline doesn't want to do the latter. Besides, apparently I'm a bad
      maintainer, which makes sense since for some reason I seem to want to have
      a career, a life, raise a family with kids and have hobbies, all of which
      have nothing to do with linux.

      Can it be made to scale to 4096 CPUs?

      Sure I guess you could run one runqueue per CPU package instead of a global
      one and so on, but I have no intention whatsoever at doing that because it
      will compromise the performance where *I* care.

      The "bad maintainer" part is referring to bad blood over the adoption of Ingo Molnar's CFS [kerneltrap.org] over Kolivas's own RSDL, in particular at least one LKML poster suggesting that, all else being equal, it'd be better to merge Molnar's code, as he was more likely to be a reliable maintainer (Molnar's more tied into the workings of the mainline kernel development/merging/etc.).

      • Re: (Score:3, Interesting)

        The "bad maintainer" part is referring to bad blood over the adoption of Ingo Molnar's CFS [kerneltrap.org] over Kolivas's own RSDL

        Yeah but Con just didn't give the impression that he intended to be around to support his code. He is an anaesthetist. Software is a hobby which he could give up whenever he wants to. I think that is very different from somebody who is doing software for their career.

        • Re:Glory! (Score:5, Informative)

          by Trepidity ( 597 ) <[gro.hsikcah] [ta] [todhsals-muiriled]> on Sunday September 06, 2009 @05:21AM (#29330211)

          Yeah, that makes sense, but he seems to have taken it personally. It sounds like part of it stems from his feeling [lkml.org] that Molnar unnecessarily wrote a replacement using his ideas and got credit for it, instead of helping out to turn one of Kolivas's fair-scheduling proposals into something that could be merged. Though from what I can tell Molnar's replies are all pretty friendly, and he seemed keen to provide appropriate credit.

        • Re:Glory! (Score:5, Insightful)

          by mwvdlee ( 775178 ) on Sunday September 06, 2009 @06:30AM (#29330395) Homepage

          The whole point is moot. Relying on a single maintainer is just plain stupid. "All things being equal" they should choose the code which OTHER people can maintain easier.

    • Re:Glory! (Score:5, Informative)

      by kav2k ( 1545689 ) on Sunday September 06, 2009 @04:54AM (#29330117)

      Oh yeah, and which other scheduler's, if any, did this guy write?

      SD scheduler [kerneltrap.org]

    • Re:Glory! (Score:5, Insightful)

      by blind biker ( 1066130 ) on Sunday September 06, 2009 @05:20AM (#29330205) Journal

      I wonder what BeOS had, that was so good. I mean, was it a scheduler thing? Or was it the pervasive multithreadedness that the OS almost forced upon the developers? Whatever it is, it worked like black magic: BeOS would always listen to the user input, no matter what the heck it was doing in the background, no matter what insane load was on the CPU - your mouseclicks were always reacted upon immediately, your drags were always reacted upon immediately, your typing, resizing, brushstrokes, midi-signals, whatever, always, under any circumstance, were immediately and smoothly followed by the correct response.

      I was hoping Windows 2000 would achieve that, then I was hoping Windows XP would achieve that, then I was hoping some of the newer 2.6 kernels in Linux coupled with innovations in X would achieve that - but I was always deeply, utterly disappointed. Then I kinda hoped Vista would get somewhat close to what BeOS did. Oh yeah, now that was a hope decisively smashed.

      • by amn108 ( 1231606 )

        It is certainly a good thing - instant response (as far as the user is concerned, since "instant" is relative here). I have never used BeOS, and have to wonder - how was its "race-to-complete" task performance? If everything in the system was so catered to response timings but (concurrent) task performance suffered (in a pre-emptive multitasking OS, every task shares time with others, at least the CPU scheduler), then the user is not happy either. He/she wants instant response AND switft audio/video encodin

        • by Mprx ( 82435 )
          Response time is more important. For bulk data processing you can leave it running overnight. You're not there to notice any slowdown. If you do this kind of processing often then you'll probably have a dedicated machine with a kernel optimized for the task, but for most people it makes no difference if it took 6 hour or 8 hours. I use a latency tuned 2.6 kernel, but even on fast Core 2 Duo with 4GB ram I'm not happy with interface responsiveness. I'm very interested in this new scheduler.
        • Re:Glory! (Score:5, Insightful)

          by Blakey Rat ( 99501 ) on Sunday September 06, 2009 @12:49PM (#29332699)

          No normal user cares about their video encoding being 2 seconds slower (over a 3 hour process) because they wanted to answer their email. If that's really important to you, you are probably doing your video encode overnight or during some time when nobody's using the computer, anyway, and then it doesn't matter.

          Instant response is *always*, *always* more important than all other tasks. Always. One of the many, many things BeOS got right.

      • I was hoping Windows 2000 would achieve that, then I was hoping Windows XP would achieve that, then I was hoping some of the newer 2.6 kernels in Linux coupled with innovations in X would achieve that - but I was always deeply, utterly disappointed. Then I kinda hoped Vista would get somewhat close to what BeOS did. Oh yeah, now that was a hope decisively smashed.

        Yup, but apparently Microsoft 'listened' to the screams of outrage, hate and despair that the users of Vista cried out, and changed things in W7 t

        • Re:Glory! (Score:4, Interesting)

          by Simetrical ( 1047518 ) <Simetrical+sd@gmail.com> on Sunday September 06, 2009 @01:23PM (#29333015) Homepage

          Anyway, Windows has had 2 schedulers for ages - you can select desktop or server style processing (and cache strategy) since NT4.

          That's not two schedulers, it's just some tunables. See pages 391 to 444 of Windows Internals, 5th Edition (or comparable pages in earlier editions). For instance, on Vista the default quantum is two clock intervals (a "clock interval" is usually about 10 to 15 ms), while on Windows Server it's twelve clock intervals. Similarly, on desktops an extra boost is given to the currently focused application. You can adjust this at runtime in the GUI on Vista under Advanced System Settings -> Advanced -> Performance -> Settings -> Advanced (yes, apparently scheduler adjustments are very advanced in Microsoft's view). It can be controlled with slightly more granularity with the registry key HKLM\SYSTEM\CurrentControlSet\Control\PriorityControl\Win32PrioritySeparation (a six-bit bitfield).

          Linux currently offers scheduler tunables both at compile-time and runtime. Try ls /proc/sys/kernel/sched_*. It has more than Windows, apparently. I expect there are some compile-time options too, but I'm not an expert in anything related to kernels or systems programming.

          • Re: (Score:3, Informative)

            by Chrisq ( 894406 )

            That's not two schedulers, it's just some tunables. See pages 391 to 444 of Windows Internals, 5th Edition (or comparable pages in earlier editions).

            I'd mod you informative, given that this is Linus's preferred option this is an important distinction

  • *sniff* (Score:5, Funny)

    by s4m7 ( 519684 ) on Sunday September 06, 2009 @04:42AM (#29330075) Homepage
    I smell another LKML flamewar coming....
  • by erroneus ( 253617 ) on Sunday September 06, 2009 @04:49AM (#29330105) Homepage

    Clearly, Desktop Linux and Server Linux have some things in common, but they also have different needs. I'm not intimately familiar with any kernel programming but I do have some basic understanding of how it all works and even I find it relatively easy to understand that the needs of a good and snappy desktop and those of reliable server are going to have some differences.

    I think it is beyond time that some sort of kernel operating mode optimizations are enabled like this scheduler thing for desktop even if the defaults are for server.

    • I'm really wondering where that either/or comes from... I mean they are like children "I want this!" "No, I want THAT!".

      Put in a configure option like grown-ups, and like any other real developer, and be done with it!

      Power really corrupts. And actually, I have this configure option in my kernel, because of some nice guy -- that is none of those whiners -- is doing a high performance patchset. I did not even know that others have no choice.

      • by Kjella ( 173770 )

        Put in a configure option like grown-ups, and like any other real developer, and be done with it!

        Even in a kernel there are many things that aren't performance sensitive, but the scheduler is not one of them. From what I understood from the kernel discussion last time, this would probably have to be #ifdefs galore. It's also not just the algorithm itself, everything that collects data for the scheduler to use also costs cycles. After all this runs 1000 times a second, it has to be as lightweight as possible.

        • by TheRaven64 ( 641858 ) on Sunday September 06, 2009 @09:18AM (#29331173) Journal

          From what I understood from the kernel discussion last time, this would probably have to be #ifdefs galore.

          No, it really wouldn't. Take a look at how Xen and FreeBSD implement pluggable schedulers. Each scheduler in Xen is identified by a struct which contains pointers to its state and all of the functions related to actions the scheduler needs to take. These are called from the rest of the code (most commonly the timer interrupt handler). The total extra cost is one extra load instruction per call, which is tiny compared to the amount of work that the scheduler does. In FreeBSD, it's even simpler. The functions that implement the scheduler are declared in a header and implemented once in each scheduler's .c file(s). At compile time, you simply compile in the scheduler you want. Total run time cost is zero. FreeBSD cares about stability, so they've retained the old 4BSD scheduler all through the transition to the ULE scheduler (which, by the way, was outperforming the CFS in the last set of benchmarks I saw, although not by as large a margin as it outperformed the old Linux scheduler). This allows people operating servers that would rather sacrifice a little performance than use relatively new code to select the old one. Xen is designed for a variety of workloads, and so it has several schedulers that you can choose between.

          Of course, these are only possible if the interface between the scheduler and the rest of the kernel is clean already. If it isn't, however, then you almost certainly have bigger problems than not being able to choose between two schedulers.

  • forward looking (Score:5, Informative)

    by Trepidity ( 597 ) <[gro.hsikcah] [ta] [todhsals-muiriled]> on Sunday September 06, 2009 @05:02AM (#29330141)

    Took me a while to figure out what "forward looking" means in this context, since "forward-looking scheduler" doesn't seem to be common terminology, and I assumed he wasn't talking about his grand forward-looking vision for schedulerdom.

    Based on some previous arguments he's had, it sounds like he opposes the common heuristic of upping interactive process priority by keeping track of how long processes sleep--- processes that sleep a lot are probably I/O bound, and should get a priority boost so they can run on the (less frequent than for CPU-bound processes) occasions when they're ready. Kolivas wants schedulers to be forward-looking in the sense that they decide how to schedule without looking at process run history, by looking purely at who's ready to run, available timeslices, priorities, etc.

  • by BlackSabbath ( 118110 ) on Sunday September 06, 2009 @05:13AM (#29330187)

    Haven't run Linux as my personal OS since 2003 but I had a lot of time (pun intended) for CK's schedulers. Now a whole new generation of youngsters can finally learn what a _REAL_ LKML flamewar looks like ;-)

  • 4096 cpu machines (Score:4, Interesting)

    by boldie ( 1016145 ) on Sunday September 06, 2009 @05:39AM (#29330241)
    Still some grudge towards Torvalds and Molnar? From the FAQ:
    Are you looking at getting this into mainline?
    LOL.

    No really, are you?
    LOL.

    Really really, are you?

    No. They would be crazy to use this scheduler anyway since it won't scale to their 4096 cpu machines. The only way is to rewrite it to work that way, or to have more than one scheduler in the kernel. I don't want to do the former, and mainline doesn't want to do the latter. Besides, apparently I'm a bad maintainer, which makes sense since for some reason I seem to want to have a career, a life, raise a family with kids and have hobbies, all of which have nothing to do with linux.


    Reminds me of this XKCD [xkcd.com].

    I don't have 4096 CPUs, good job Con Kolivas!
    • by petrus4 ( 213815 )

      Still some grudge towards Torvalds and Molnar? From the FAQ:

      Apparently Linus genuinely is growing a little more prickly in his old age. While he's still got a fair way to go to equal Theo, he apparently does have a tendency to snap and snarl at people, on occasion. You might want to look up how he treated Alan Cox in relation to the tty code in the kernel, as well.

      • by TheRaven64 ( 641858 ) on Sunday September 06, 2009 @09:33AM (#29331263) Journal
        Having read flames from both Theo and Linus, it's difficult to make a fair comparison. Linus is a bit more gentle than Theo, but he is much more likely to be wrong when he flames someone. Neither of them is any good at admitting when they are wrong, but Linus has had a lot more practice at being wrong and not admitting it.
      • Re: (Score:3, Interesting)

        by SL Baur ( 19540 )

        You might want to look up how he treated Alan Cox in relation to the tty code in the kernel, as well.

        I followed that. Linus wasn't wrong about anything and Alan was acting a tad obtuse. 2.6.32 has been delayed another week to pick another louse out of the pty code.

        There was more going on than was posted on lkml. Alan has always called Linus "pinhead" and gotten away with it.

        Although he has an abrasive personality with developers at times, Linus is pretty good with testers. He was very patient with me in the 1.3 cycle (including sending me patches to test) as I was debugging what would ultimately prove

  • He ain't kidding. (Score:5, Insightful)

    by Ant P. ( 974313 ) on Sunday September 06, 2009 @05:52AM (#29330285)

    CFS can't even cope with a CPU-bound application [foldingforum.org].

    Who here runs Linux on anything with more than 16 cores? Why should everyone else get the shitty end of the stick just because of maybe a dozen institutes with deep pockets?

    • Re: (Score:3, Interesting)

      by dbIII ( 701233 )
      I don't know about you, but I run 8 CPU linux cluster nodes at 100% on all CPUs for weeks at a time and I'm only at the very bottom end of "high performance computing". For about two minutes in total a day the nodes are dumping things to disk (snapshots) and are I/O bound. The rest of the time they are pegged at 100% until the job finishes (which takes days to weeks - geophysical stuff). There are several applications that behave this way on these nodes, but there are some that sit waiting doing nothing
      • by gbjbaanb ( 229885 ) on Sunday September 06, 2009 @09:00AM (#29331035)

        I think what you want is not a single scheduler designed for the desktop, but one designed for server processes. That's probably the whole argument here - there isn't a single scheduler that can work efficiently for the 2 wildly different types of work a user put a machine to, but currently you don't have a choice. This is all about giving users choice of what kind of scheduler they'd like to run. You might even find that a scheduler designed for lots of CPUs (at the expense of interactivity probably) would suit you much more than the current system, especially when you buy more cores.

    • Re: (Score:3, Insightful)

      by markdavis ( 642305 )

      >Who here runs Linux on anything with more than 16 cores?

      Along the same lines... Who here runs their Linux *servers* with 16 or *less* cores? Probably 99.9%?

      And "server" doesn't really mean anything. At work, we use Linux thin clients, so the Linux "server" is really dealing with 150 desktops, except not managing X/kb/mouse. So should it be treated like a "server" or a "desktop" for scheduling?

    • Who here runs Linux on anything with more than 16 cores?

      My personal server. [sun.com] A debian based distro of Gnu/Linux is much easier for me to admin than Solaris. Massively multicore is the future. I wouldn't buy any new computer with less than 16 cores/hardware threads. Well, except for laptops and embedded systems.
      • Re: (Score:3, Interesting)

        by TheRaven64 ( 641858 )
        And how does Linux handle the T2? The chip has some incredibly complex scheduling constraints; for good performance you need to track both the cycle counter and the wall clock (to balance memory and CPU-bound loads), you need to balance cache churn with workload in your processor affinity (sometimes having related threads on the same core is faster, sometimes it isn't). Somehow, I can't help feeling that the one-size-fits-all scheduler in Linux doesn't actually do all of this.
    • CFS can't even cope with a CPU-bound application.

      Note that the thread you linked to compared schedulers based on per process CPU "usage" levels (90-95% vs 100%). Those numbers are not accurate representations of anything close for evaluating scheduling algorithms. There are many reasons for that, but let me just say that the number given there depends upon sampling and can be wildly inaccurate.

      If they really wanted to test CPU gains from scheduling efficiency, they should have tested the difference in ti

  • by MosesJones ( 55544 ) on Sunday September 06, 2009 @06:18AM (#29330347) Homepage

    16 sounds like a ridiculously high number for a desktop but is it?

    Already we have 4 core processes which have "soft" additional threads (Intel's HT for instance) and some people already have dual CPU desktop machines meaning they are already at the 16 CPU limit.

    Roll on 12-18 months and we'll be seeing 8 core CPUs with 8 soft-cores as coming in on top end desktops. Roll forwards 3 years and you'll be seeing 32 core CPUs with 32 soft-cores which is where the scheduler breaks down.

    So the problem here is that this is a brilliant optimisation for today and for pieces like the netbook market but won't be good for the desktop market long term.

    With Linux looking to be strong in the netbook market however it does say that having a more efficient scheduler for that market would be a better idea than just optimising everything for the server side.

    • [...] So the problem here is that this is a brilliant optimisation for today and for pieces like the netbook market but won't be good for the desktop market long term. [...]

      How is this a problem? The scheduler supposedly (I did not test it) works well for the current situation, so it should be looked into and used if it holds up to its promises. And when the technical progress renders it outdated, it should be discarded and replaced with something better.

      I would rather have a better scheduler right now and switch again in three years than put up with one which works suboptimal now and may or may not run better on future hardware.

    • 16 sounds like a ridiculously high number for a desktop but is it?

      16 is very high for a desktop system. The majority of "desktop" systems are now laptops. I doubt you're going to see 16+ cores in a laptop anytime soon. Very few people are buying desktops these days and the few people who actually need a desktop system with 16+ cores are probably going to have entirely different workloads from the average user.

      • Re: (Score:3, Insightful)

        by TheRaven64 ( 641858 )

        16 probably isn't very far off. The ARM Cortex A9, which is starting to ship into handhelds and mobile phones, scales to 4 cores. The A10 will probably handle 16, so expect to see handheld computers with 16 cores in the next couple of years. Of course, when you're on battery power, you'll probably want to turn a few of these off, so the scheduler has to decide not just which jobs to run, but how many cores to enable at any given time. This is a really difficult problem (you can read some interesting pap

    • AMD has 6 core right now and 12 in 2Q10. Intel and AMD will have 16 core by end of 2010 or early 2011. They are designed to run in multi-socket systems.

    • Everyone considers the netbook market. Why won't anyone think of the mobile phones?!

    • by SpinyNorman ( 33776 ) on Sunday September 06, 2009 @10:25AM (#29331607)

      I guess you didn't read TFA:

      Can it be made to scale to 4096 CPUs?

      Sure I guess you could run one runqueue per CPU package instead of a global
      one and so on, but I have no intention whatsoever at doing that because it
      will compromise the performance where *I* care.

      In the meantime if you care about CPU utilization and latency then use this. Tomorrow will take care of itself. It's not like if you buy one computer or graphics card, or build one kernel, that you're tied to it for the rest of your life. You use this year what's available and update when the situation warrants it.

  • The FAQ:

    Sorry, it's not the right tool for me so it's not worth me investing the time
    in setting one up.

    C'mon Con. DSCM is a great way to distribute forks of software. If you don't like git (I don't) there is a mercurial mirror [kernel.org] of the linux kernel available and hosting a repository is dead easy. There are plenty of free options anyway. Or ask me.

  • I only care about 200-800MHz single core ARM performance. When I do have a dual-core ARM, I'm only running Linux on one core in that situation. Not only am I am evil bastard that doesn't cared about desktop performance, like those nasty server-oriented kernel maintainers, I also don't care about server performance!

    That said I think I like his scheduler for embedded. I may have to try the patch out at work and see how many apps and drivers choke because it exposes their races.

    I could do without his emotional

  • Why have you put an editorial "sic" in there? "i.e." is perfectly valid in the context in which it was used, it's an abbreviation of the Latin, "id est", or "that is".

    The quote, if read in a manner expanding the abbreviation, would read "...and not scale to massive hardware. That is, it is a desktop orientated scheduler..." I would probably have changed the full stop after "hardware" to a semicolon, but that's me.

    • Because either the 'i' should have been capitalized since "hardware" was followed by a period, or the period following "hardware" should have been a comma.

      Since neither construction was used, the paragraph as written did not follow the conventional rules of grammar, therefore, the sic was required.

      I also could have written "[hardware, i.e.,]", but that wouldn't have led to so many fruitful side discussions.

  • ...is how many other scenarios there, have been, where someone had code for the kernel which was better than the default, but which got arbitrarily rejected by Linus out of hand. This might be a high profile case, but I'll be money that it's probably nowhere close to having been the only one.

    The benevolent dictator model, when it works, is a good thing. However, Linus, like all of us, is human, and he's also been working on the kernel for a long time now.

    There would have to have been times when he has mad

  • Kudos Con (Score:4, Interesting)

    by amightywind ( 691887 ) on Sunday September 06, 2009 @09:41AM (#29331309) Journal

    Welcome back Con! I wonder how long it is before Ingo "Kudos Con" Molnar rips of the new design? The kernel team has developed a very bad case of "not invented here." http://kerneltrap.org/node/8059 [kerneltrap.org]

"If you don't want your dog to have bad breath, do what I do: Pour a little Lavoris in the toilet." -- Comedian Jay Leno

Working...