Slashdot Mirror


The ~200 Line Linux Kernel Patch That Does Wonders

An anonymous reader writes "There is a relatively miniscule patch to the Linux kernel scheduler being queued up for Linux 2.6.38 that is proving to have dramatic results for those multi-tasking on the desktop. Phoronix is reporting the ~200 line Linux kernel patch that does wonders with before and after videos demonstrating the much-improved responsiveness and interactivity of the Linux desktop. While compiling the Linux kernel with 64 parallel jobs, 1080p video playback was still smooth, windows could be moved fluidly, and there was not nearly as much of a slowdown compared to when this patch was applied. Linus Torvalds has shared his thoughts on this patch: So I think this is firmly one of those 'real improvement' patches. Good job. Group scheduling goes from 'useful for some specific server loads' to 'that's a killer feature.'"

18 of 603 comments (clear)

  1. teh snappy!!!! by schmidt349 · · Score: 5, Insightful

    Considering that UI lag was always my big problem with anything Linux-based (hell, it even seems to affect Android phones), this might be one small patch for the kernel, one giant leap for userspace...

    1. Re:teh snappy!!!! by ArsenneLupin · · Score: 5, Funny

      Good luck, Mister Gorsky!

    2. Re:teh snappy!!!! by TheRaven64 · · Score: 5, Informative

      But the fact that Windows and OS X and many other lesser OS have fixed this problem years ago could also be used to show that Open Source is not quite as up on the times as you would like to think.

      Seriously? OS X has absolutely terrible scheduling. A process that causes some swapping will cause beachballs everywhere and can freeze the windowserver for several seconds (well, the mouse keeps moving, but nothing else does). Hell, I have a FreeBSD VM on my Mac that responds better under load than stuff outside of it does.

      --
      I am TheRaven on Soylent News
  2. Re:Compiling the kernel by suso · · Score: 5, Funny

    I used to. For 3 years. But I wanted my time back.

  3. Wait.... by fuzzyfuzzyfungus · · Score: 5, Funny

    That's not a kernel patch... That's a bash script that forcibly installs BeOS!

  4. Re:Compiling the kernel by fuzzyfuzzyfungus · · Score: 5, Informative

    They aren't compiling the kernel to see how long it will take(which, as you say, is rarely of all that much interest, few people do it and a fast build-box isn't going to break the budget of a serious project), they are using a multithreaded kernel compilation as an easy way to generate lots of non-interactive system load to see how much that degrades the performance, actual and perceived, of the various interactive tasks of interest to the desktop user.

    This isn't about improving performance of any one specific program; but about making a reasonably heavily-loaded system much more pleasant to use. Compiling the kernel is just a trivial way to generate a large amount of non-interactive CPU load and a bit of disk thrashing...

  5. Re:Distros? by Ltap · · Score: 5, Informative

    Arch Linux: Already in core.

    I exaggerate, but it's not far from the truth - the kernel releases are imported into the testing repository as soon as they come out.

    --
    Yet Another Tech Blog
    (but so much more, including game and movie reviews)
    http://yanteb.peasantoid.org
  6. Isn't it awesome by bcmm · · Score: 5, Insightful

    Isn't it awesome when a new version of your OS performs *better* than the last one on the same hardware?

    --
    # cat /dev/mem | strings | grep -i llama
    Damn, my RAM is full of llamas.
  7. This was always my biggest problem with Linux by dselic · · Score: 5, Funny

    No matter how many different flavors of Linux I installed, it just never seemed as snappy as Windows. There was always a sluggishness about it, nothing I could really put my finger on, but it was definitely there and it bothered me. I'm very glad to hear that a solution is in sight.

    I hope the people at Ubunto get this out as an update as soon as possible.

  8. will this help with the swap-paralysis problem? by Anonymous Coward · · Score: 5, Interesting

    This has been brought up by others on slashdot before, but Linux tends to be either (A) fine and happy, or (B) pushed into a thrashing state from which it can never recover - like it takes 8 or 10 minutes to move the mouse cursor across the screen. Since there is relatively no warning before this happens, it makes a hard reboot just about the only option.

    Will this patch help with that issue? Like the threads below say, once a modern (KDE/Gnome) desktop Linux starts swapping, there is so much new data produced per second by the GUI that it's basically game over. I'd like to see a fix for this: it's the single biggest cause on Linux that makes me do a hard reboot. I just don't have the patients to see if the thing will recover in half an hour or so, even though it might.

    http://ask.slashdot.org/comments.pl?sid=1836202&cid=33998198
    http://ask.slashdot.org/comments.pl?sid=1836202&cid=33999108
    http://www.linuxquestions.org/questions/linux-kernel-70/swap-thrashing-can-nothing-be-done-612945/

  9. Re:Wasn't there a desktop friendly scheduler rejec by tenchikaibyaku · · Score: 5, Informative

    This is not the scheduler that the grandparent would be referring to though. BFS has been around for about a year, and has as far as I know never actually been pushed for inclusion.

    The previous scheduler that Con wrote was rejected in favor of CFS which is currently in use by the kernel. CFS is at least partly based on ideas from Con, and he was also credited for them.

  10. But 400 lines of code.... by Anonymous Coward · · Score: 5, Funny

    ....would make it 2x faster! LOC is the #1 metric for programming.

  11. Re:Compiling the kernel by Albanach · · Score: 5, Funny

    I used to. For 3 years.

    Wow, I think my K6 pentium clone could compile the kernel faster than that!

  12. Re:Compiling the kernel by morgan_greywolf · · Score: 5, Informative

    Yep. For those that haven't tried it without the patch, a multithreaded kernel compile will typically peg a modern multicore CPU at 100% and will even give you drunken mouse syndrome. Just being able to scroll around a browser window while doing a lengthy make -j64 is impressive. Being able to watch 1080p video smoothly is ... astounding. Especially when you consider the minimum CPU requirement for 1080p H.264 playback is a 3 GHz single core or a 2 GHz dual core.

     

  13. Actually understand the benchmark, then criticize by Zero__Kelvin · · Score: 5, Insightful

    "Compiling the kernel isn't a useful benchmark. How well does it deal with running Adobe Air?"

    Obviously you've never compiled a kernel passing -j64 to the make process. If you had, you would know that all your CPUs would be pegged (indeed -j7 pegs all 8 cores on my laptop.) Of course that is not the benchmark part. The point is that with an "all your processors are belong to kernel build" condition, group scheduling allows there to be essentially no perceived slowdown for interactive GUI/Window manager based computing. You probably should have figured out that you were missing something when Linus Torvalds didn't object to the benchmark and the results. Seriously, this is a major point to understand: When it comes to the kernel, in a fight between your knowledge and Linus', Linus wins.

    --
    Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
  14. Re:Compiling the kernel by Inda · · Score: 5, Funny

    If it takes less than 3 years, you're doing it wrong.

    --
    This post contains benzene, nitrosamines, formaldehyde and hydrogen cyanide.
  15. Re:Compiling the kernel by Anonymous Coward · · Score: 5, Funny

    recompile the Gentoo kernel using --mph=88

  16. Re:Compiling the kernel by morgan_greywolf · · Score: 5, Insightful

    1) There are no 1200 kbps dialup modems. The fastest ones do 56 Kbps under specialized conditions.

    2) If you meant to say 1200 bps modems, well, by the Linus wrote and released the first versions of the Linux kernel, 1200 bps modems and the 386SX were both well obsolete. The most common systems of that day were 486DXs running at 33 MHz at the sweet spot and 50 MHz at the high end. Most people had modems capable of greater than 9600 BPS (many around 14.4Kbps and 28.8Kbps)

    3) Now quit making fun of us real old-timers and get off my lawn .