Slashdot Mirror


Linus Pooh-Pooh's Real-Time Patch

An anonymous reader submits "Speaking with CNet via email, Linus Torvalds appears to be in no hurry to accept the latest real-time patches from embedded specialist MontaVista into the mainstream kernel, at least not "at this time." Nontheless, MontaVista's new open-source real-time Linux project could broadly expand commercial opportunities for the open source OS, especially in telecom initially, where real-time Linux will likely play on "both ends of the wire." For example, Linux is already making progress in smartphones."

78 of 262 comments (clear)

  1. Better link by Anonymous Coward · · Score: 5, Informative

    Direct link to they story.

    1. Re:Better link by Anonymous Coward · · Score: 2, Interesting

      And a link to the Slashdot story where we discussed the real-time patches on Saturday.

  2. Patents ? by Anonymous Coward · · Score: 2, Interesting

    Wouldn't a real time patch violate software update patents

    1. Re:Patents ? by ryanmfw · · Score: 2, Interesting

      It's not a *real time patch*, it's a *real time* patch. It doesn't change the kernel while running, it changes the behavior of the kernel to be a real time one. I'm a little hazy on the difference, but I think it mainly has to do with scheduling, and that it will give high priority tasks all the time they need.

      --
      Hurricane Ivan: A 17th century prison collapsed. All of the inmates escaped.
    2. Re:Patents ? by Rosco+P.+Coltrane · · Score: 3, Interesting

      Perhaps Victor Yodaiken might want to pull another one of his lame patent stunts on Montavista. That'd be rather amusing actually...

      --
      "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    3. Re:Patents ? by d_jedi · · Score: 5, Informative

      RTFA.

      A hard realtime operating system is one where calls to the operating system are guaranteed to be executed within a certain timeframe.

      --
      I am the maverick of Slashdot
    4. Re:Patents ? by valkraider · · Score: 3, Funny

      and that it will give high priority tasks all the time they need.

      DOS did this back in the 80's....

    5. Re:Patents ? by pavon · · Score: 3, Informative

      Uhm, no. He has given an irrevocable, royalty-free licence for it's use in GPL'd software. Montavista RT Linux is GPL'd. Besides if you read the patent you will see that it is for something that has nothing to do with Montavista's code. Yodaiken's approach was to run the linux kernal as a process of a smaller realtime kernal, and it is that technique that he patented. Montavista is modifying the Linux kernal itself to be run-time, which is a much more difficult task, and would not infringe on this patent whatsoever.

    6. Re:Patents ? by tchuladdiass · · Score: 4, Informative

      Shared libraries also save ram -- multiple programs using the same shared library all point to the same copy that is in memory. Which also ends up giving a speed boost (more memory free).

    7. Re:Patents ? by AuMatar · · Score: 4, Insightful

      It saves as many versioning problems as it causes. Imagine there's a buffer overflow in libc. Would you prefer to patch every app on your system from ls to mozilla? Or would you rather update just libc?

      --
      I still have more fans than freaks. WTF is wrong with you people?
  3. is Linus ever in a hurry? by Anonymous Coward · · Score: 2, Funny

    - i don't think so!

  4. RTOS by darth_MALL · · Score: 4, Informative

    I learned something new!
    Real Time Operating Systems. Now you know!

  5. Might not be in a hurry.... by ryanmfw · · Score: 3, Insightful

    He might not be in a hurry, but I'd be surprised if he doesn't realize how this could help Linux. Maybe there are some stability problems with it, but then, I doubt that too. Does anyone have any experience with it? Maybe he's just waiting for the right time, not the earliest time.

    --
    Hurricane Ivan: A 17th century prison collapsed. All of the inmates escaped.
    1. Re:Might not be in a hurry.... by Elwood+P+Dowd · · Score: 5, Informative
      He might not be in a hurry, but I'd be surprised if he doesn't realize how this could help Linux.

      I'd be shocked if he didn't realize exactly how this patch would impact Linux. From the article:
      "Almost nobody wants hard real-time, even in embedded devices," Torvalds said in an e-mail interview. Adding the feature makes the operating system more complex and burdens the process of "locking," in which the operating system assures that different processes don't step on each others' toes when vying for the same resources.

      Asked whether MontaVista's proposed software could be accepted into the main kernel, he said, "I personally think it's too intrusive, at least at this point," though it might be possible to merge the patch into the kernel in smaller pieces.
      Iduno what else there is to discuss...
      --

      There are no trails. There are no trees out here.
    2. Re:Might not be in a hurry.... by Elwood+P+Dowd · · Score: 2, Funny

      Oh. That's exactly what you said. I can't read.

      --

      There are no trails. There are no trees out here.
    3. Re:Might not be in a hurry.... by irokitt · · Score: 4, Insightful

      Not stability, complexity and responsiveness. Adding real-time elements to the mainstream kernel means that priority tasks get executed first, but the average time taken to finish a task is significantly higher. The result would be an excellent system for medical equipment or ilk, but it would make a sluggish desktop or server, and most Linux devices now are desktops or servers. And the complexity of adding this in would only be justified if it benefitted a lot of people. So Linus is waiting to see how things look a little later. It should be possible to create a custom kernel that uses these features, but they don't belong in the vanilla kernel yet.

      --
      If my answers frighten you, stop asking scary questions.
    4. Re:Might not be in a hurry.... by metlin · · Score: 4, Insightful

      I'm guessing that maybe he has his own reasons that he does not want to divulge?

      Especially given the current sue-happy folks who're looking at suing everything that is Open Source, maybe Linus is just playing it safe.

      For all you know, he's trying to see if there are any IP violations before accepting them into the code-base. You never know.

    5. Re:Might not be in a hurry.... by skraps · · Score: 5, Funny
      Maybe he's just waiting for the right time, not the earliest time.

      Sooo.. Linus is real-time, but Linux is not.

      (yes, my jokes are that lame.)

      --
      Karma: -2147483648 (Mostly affected by integer overflow)
    6. Re:Might not be in a hurry.... by ajs · · Score: 4, Insightful

      As if Linux wasn't one of the bloated kernels already.

      People throw around bloat with great abandon, and usually without any real rationale behind the term. In this case, you have the creator and current maintainer of one of the world's most complex pieces of software which handles millions of different configurations across hundreds of devices and architectures saying, in effect, "this patch would make the kernel too complex." That speaks to me of a level of complexity which I cannot even reasonably grasp (and I can grasp a hell of a lot of complexity).

      Personally, I'd love to see RT linux for real (as opposed to semi-real-time features like low-latency and preemptability), but not at the cost of the stability of the OS. Let it mature the way PCMCIA did. Linus didn't accept that right off the bat either, and we were better off for it in the long run, as I think the PCMCIA subsystem had to work hard to maitain itself coherently while not shipping with the OS, and/or not being updated regularly.

      As for bloat... I've yet to see anything that is not modularly removable from the kernel which was not essential to a modern OS. There are many cases where I'd love to drop old hardware, but that's not usually realistic. There are many modules which I have no use for, but I can always turn those off. There are many features for hardware I don't use, but removing them would be unfair to people on those platforms.

      What bloat did you have in mind?

    7. Re:Might not be in a hurry.... by richg74 · · Score: 4, Insightful
      He might not be in a hurry, but I'd be surprised if he doesn't realize how this could help Linux.

      I'd suggest the reason he is not in a hurry is that he does realize how this could help Linux, and also how it could hurt Linux. Adding real-time capability is not a free lunch.

      As the original C|NET article suggests, there is a class of applications that need real-time capability (which, BTW, is mostly about being able to say that interrupt X will be handled in not more than N time units). But for most applications, real-time capability is neither needed nor really desirable: having it comes at a cost in average processing efficiency.

      Incidentally, telecoms is mentioned as a possible application. I don't know enough about cellular telephony to say if it fits, and maybe there are some VoIP applications where it would make sense. But for conventional circuit-switched telecoms (e.g., a telephone switch), it really is not needed.

    8. Re:Might not be in a hurry.... by StateOfTheUnion · · Score: 2
      I would agree . . . there are lots of applications in manufacturing that depend on realtime applications. Though safety and mission critical apps are still on more fault tolerant Sun, HP-Risc, and big IBM boxes, many of them are moving to the kludgy WinTel monopoly because of easy of maintanence and lower hardware cost. Windows has really made huge inroads on the client side of these large control systems . . . and they are slowing taking over the server side OS.

      I think that Linux has a real opportunity here because the mission critical systems are almost all Unix based. It wouldn't be that big a leap to migrate to Linux; customers are already UNIX skilled. However, the Linux community seems to have done very little to convince people like Honeywell, Foxboro, Yokogawa, Fisher-Provox and ABB (The leaders in large scale manufacturing digital control systems) that Linux would be a suitable alternative in their marketplace.

    9. Re:Might not be in a hurry.... by DAldredge · · Score: 5, Funny

      I am almost sure that Linus stated policy on IP violations is to not give a flying fuck till someone bitches.

    10. Re:Might not be in a hurry.... by Greyfox · · Score: 2, Insightful
      I remember when there was a huge to-do in the community because the compressed kernel source had just hit 10 MB! For a long time my kernel compile time was consistently "overnight", first on a 386 SX/16 with 4MB of RAM and later on a 486/33. These days... not so much. I can compile it in about 10 minutes now.

      My point? Get off my lawn you damn kids! Heh heh heh...

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    11. Re:Might not be in a hurry.... by AaronW · · Score: 4, Insightful

      At my company we are using Timesys embedded Linux for its real-time options. For telecom, it is absolutely necessary to have real-time in many cases. I.e. if a packet is delayed, it will cause a glitch in the audio or somesuch. The major problem we have with Timesys is that their kernel is a bit out of date (2.4.18) and is missing some critical patches and that they have not applied their changes to the 2.6 kernel tree.

      Other things are things like priority inheritance support, to prevent problems caused by priority inversion (which caused problems in the original Mars rover).

      For voice support, if you don't mind crappy sound or are only handling one or two calls, you can get away without real-time, but for serious use, it is essential.

      Maybe for control path processing it isn't essential, but as soon as it becomes part of the data path, real-time is essential.

      --
      This post is encrypted twice with ROT-13. Documenting or attempting to crack this encryption is illegal.
    12. Re:Might not be in a hurry.... by SlowMovingTarget · · Score: 2, Informative

      Actually, the article hints at Linus' mastery of the issue by clueing the reader in on a few consequences of hard real time systems. The problem is that while the OS would be capable of guaranteeing a response within tens or hundreds of microseconds, the overall response time of the system is reduced. Linus is quoted as saying he believes most people, even in the embedded space, don't want this as a standard feature of the OS. This is because there's a comparatively easy fix for getting quick response times: over-provision the hardware.

      For HRT systems, however, it's not good enough that the response time is "probably good enough, most of the time." HRT systems require a guarantee, and that guarantee has a net effect of slowing down the system.

      Compare it to "guaranteed-secure" encryption. It's possible (quantum encryption), but it requires a physical fiber connection (a polarized light-pipe) and some serious detection hardware.

      The article goes on to say that Linus may consider putting pieces of the patch into the kernel in the future.

    13. Re:Might not be in a hurry.... by swillden · · Score: 2, Insightful

      For all you know, he's trying to see if there are any IP violations before accepting them into the code-base. You never know.

      Very unlikely. With respect to copyrights, Linus requires contributors to take responsibility for the ownership of their contributions, and takes them at their word. He doesn't really have any way to do anything else since our screwed up copyright regime provides protection to unpublished works -- so how could he even check? Same holds with trade secrets. With respect to patents, Linus has publicly stated that he's been advised not to bother searching for patents, which is exactly the same advice corporate attorneys give to corporate software developers.

      I guess he could check the code for infringing trademarks. Not likely, though.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  6. Linus is right. by Power+Everywhere · · Score: 4, Insightful

    Linus is right not to accept this patch into the main kernel tree. What this would amount to is shoehorning Linux into a shoe it's too large to fill, and there is absolutely no reason burden all other Linux distros with this mess. Come on, MontaVista, don't try to cock things up for the rest of Linux just because you're too lazy to patch the kernel yourself.

    1. Re:Linus is right. by Rosco+P.+Coltrane · · Score: 5, Insightful

      Come on, MontaVista, don't try to cock things up for the rest of Linux just because you're too lazy to patch the kernel yourself.

      There are many good reasons for contributors to merge their patches into the kernel. For one thing, it means you don't have to play catch-up with the kernel releases and manage the patch on top of it, and also you get to offer your code for free review and testing.

      As for why Linus is always reluctant to accept new code in the kernel? simple: Firstly, if he accepted all (good or less good) ideas into the kernel, the damn thing would make coffee already, and I don't blame him to want to narrow the kernel's focus. But most importantly, just look at the size of the flippin' tarball already and you'll see why he doesn't want to include forever code that'll serve less than 0.5% of all Linux users.

      --
      "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    2. Re:Linus is right. by johannesg · · Score: 3, Insightful
      Come on, MontaVista, don't try to cock things up for the rest of Linux just because you're too lazy to patch the kernel yourself.

      Aren't they just being good citizens by offering up their patches for inclusion? You know, like that GPL thing says they should?

    3. Re:Linus is right. by 4of12 · · Score: 4, Insightful

      why he doesn't want to include forever code that'll serve less than 0.5% of all Linux users.

      If the patched Linux goes into embedded devices there is a much bigger market than for conventional servers and desktop computers.

      The millions of current desktops and servers could become 0.5% of all Linux users if embedded devices run Linux.

      But I still agree that Linus' go-slow approach is wise and judicious.

      --
      "Provided by the management for your protection."
    4. Re:Linus is right. by reynaert · · Score: 2, Informative
      Aren't they just being good citizens by offering up their patches for inclusion? You know, like that GPL thing says they should?

      Just to fight this stupid urban myth: The GPL doesn't say that. Please read at least the FAQ. kthx.

    5. Re:Linus is right. by B1gP4P4Smurf · · Score: 2, Informative

      Come on, MontaVista, don't try to cock things up for the rest of Linux just because you're too lazy to patch the kernel yourself.

      If you read MontaVista's original announcement, it was not posted for inclusion in the mainstream kernel, no one (including MontaVista) is claiming that it is ready. They merely posted their work to stimulate discussion and to avoid duplication of effort. So of course Linus is right, no one ever said it _should_ go in the kernel now or even anytime soon.

      Why was this modded "Insightful", the poster clearly has not bothered to understand the situation.

  7. Re:first post!!! by thomasa · · Score: 4, Funny

    Not exactly real time response here.

  8. Barely a story. by Elwood+P+Dowd · · Score: 4, Insightful

    Linus' job is to say no. Here, he even gives rationale.

    --

    There are no trails. There are no trees out here.
    1. Re:Barely a story. by SnowZero · · Score: 2, Interesting

      His job is to say no a few times, so that developers create better and better versions of the feature, until one is good enough and he says "yes".

      Kernel cleanly done kernel-preemption patch went in, but the "lock-break" patch which predated it did not . That's because the latter peppered "reschedule me" calls all over the code tree. If he hadn't said "no" the first time, the later clean solution probably would not have come.

  9. Re:MontaVista Rocks by Rosco+P.+Coltrane · · Score: 3, Funny

    I guess Linus does not realize the full potential of what real time functionality can do to Linux.

    Yes, I'm sure he has no idea...

    --
    "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
  10. Re:MontaVista Rocks by d_jedi · · Score: 3, Insightful

    While useful for certain applications (if I press the "abort" button on a missile, I want it processed NOW and not 5 seconds after it explodes..), I don't see what a hard realtime operating system would do for desktop systems.. then again, maybe I'm completely missing the point?

    --
    I am the maverick of Slashdot
  11. Blackadder quote (Sorry, I couldn't resist) by lxs · · Score: 4, Funny

    Gen. Melchett: Is this true, Blackadder? Did Captain Darling pooh-pooh you?

    Cpt. Blackadder: Well, perhaps a little.

    Gen. Melchett: Well then, damn it all, how much more evidence do you need? The pooh-poohing alone is a court-martial offence!

    Cpt. Blackadder: I can assure you, sir, that the pooh-poohing was purely circumstantial.

    Gen. Melchett: Well, I hope so, Blackadder. You know, if there's one thing I've learned from being in the army, it's never ignore a pooh-pooh. I knew a major: got pooh-poohed; made the mistake of ignoring the pooh-pooh -- he pooh-poohed it. Fatal error, because it turned out all along that the soldier who pooh-poohed him had been pooh-poohing a lot of other officers, who pooh-poohed their pooh-poohs. In the end, we had to disband the regiment -- morale totally destroyed ... by pooh-pooh!

    1. Re:Blackadder quote (Sorry, I couldn't resist) by warrendodge · · Score: 2, Insightful

      Hmmm, I think the whole story was just an elaborate setup for that joke.

  12. Linus "appears to be in no hurry to accept" by chance2105 · · Score: 4, Insightful



    Is it just me, or does this article sound like it's fueling steam for a fork of Linux development? If not adding steam for a fork, I have to say it's arrogant ...

    1. Re:Linus "appears to be in no hurry to accept" by augustz · · Score: 5, Insightful

      The article and reporters may enjoy "fueling steam", they tend to enjoy stiring up controversy.

      Linus saying it looks too invasive at the moment for him to roll-in without other testing? NO ONE is going to fault him for that. Linux has gotten where it is because people can actually use it, in contrast to plenty of other experimental efforts.

      No one is going to think he is arrogant for doing his jobs. These patches can work their way into some feeder kernels first, and the usual cycle can work itself out.

      Too many uninformed folks like to say, "Fork!" or "Arrrogant!" without ever having actually maintained any type of code base.

      What the dear poster probably doesn't realize is that there are ALREADY real time Linux kernel varients in use out there, moving stuff mainline is hardly a fork, if anything montevista is trying to get out of the separate kernel maintenance business.

      Am I missing something obviou here?

    2. Re:Linus "appears to be in no hurry to accept" by dj245 · · Score: 3, Funny
      Am I missing something obviou here?

      Yes, an s

      --
      Even those who arrange and design shrubberies are under considerable economic stress at this period in history.
  13. Real Time enhancements as a fork by Anonymous Coward · · Score: 5, Insightful

    I believe that it's appropriate to have a fork for realtime enhancements. I remember HP's philosophy in the 80's was to have a Real Time OS and a Business OS. They have competing goals. No need to blend them and end up with a compromise!

    1. Re:Real Time enhancements as a fork by DAldredge · · Score: 2, Informative

      Brain Surgery (Simple Way)

      1: Cut Head Open
      2: Poke brain with stick
      3: Close Brain.

      It's just a little harder than you make it out to be. Look how many of the subsystems have to be touched by this driver.

  14. Probably because it's not "integrated" enough? by Anonymous Coward · · Score: 2, Insightful

    RTLinux takes executive hold of the system and runs the Linux kernel as a mere user process.

    Perhaps Linus objects to this topsy-turvey approach and would prefer Linux to be re-written so it's actually completely preemptible, capable of handling interrupts with RT guarantees all by itself, etc?

  15. Hmmm... by temojen · · Score: 2, Insightful

    What makes you think it wouldn't just be annother kernel config parameter to most people?

    1. Re:Hmmm... by Mysticalfruit · · Score: 2, Insightful

      Because it's not.

      It's not just adding support for a filesystem. It's fundimentally changing how the kernel creates and schedules userland processes and kernel threads, prioritizes I/O, allocates memory and handles interupts. This in turn has a ripple effect on how applications work.

      --
      Yes Francis, the world has gone crazy.
  16. From LKML by OverlordQ · · Score: 3, Informative

    Dunno if this is even slightly relavent at all but this is from one of the other people doing Prempt things with the kernel.

    finally, i went for correctness primarily, not latencies. I checked
    out the MontaVista patches and they categorize roughly 30 spinlocks
    as the ones that are necessary to be 'raw'. Unfortunately this is
    inadequate, my patch excludes 90 such locks and it's still probably
    not a 100% correct conversion. The core kernel needs changes in the
    locking infrastructure to get rid of most of the these 90 non-mutex
    locks.

    --
    Your hair look like poop, Bob! - Wanker.
  17. Re:MontaVista Rocks by Anonymous Coward · · Score: 3, Insightful

    You are missing the point insofar that Linux doesn't aim just for the desktop and/or server market, but also, as stated above, for the embedded market where hard real time often is simply necessary. Or why else do you think OSs like QNX still exist? :)
    Whether this "aim for everything"-attitude is a good one for the Linux kernel as a whole remains unquestioned for now.

  18. Re:MontaVista Rocks by Zapman · · Score: 4, Insightful

    After digging around some (see the posts above), Linus seems to feel that the patches are too intrusive, which I can certainly understand. Hard Real time promises are not good in the general case, which is why most OSen don't bother. For the cases that require them, traditionally there are specialized OSen (QNX for example) that have the functionality needed. I'm not sure about this, but I believe that there are some specific hardware requirements for true RT. The scheduler is also radically different.

    It would not suppise me at all if this lives a long and fruitful life outside of the standard kernel, as a stand-alone patch set. That's not even a bad place to live, especially since the requirements are rather esoteric.

    --
    Zapman
  19. Links to better KernelTrap articles/email threads by dominator · · Score: 4, Informative

    From the email threads and writeups on KernelTrap, it seems as though Linus (and his Lieutenants) have some issues with the invasiveness and maintainability of the patch, which are reasonable concerns from the maintainers.

    Ingo Molnar - a RedHat employee/kernel hacker - has some patches that are similar in scope but different (and most likely preferable from a performance and maintainability viewpoint) in approach.

    Read about them here and form your own opinion:

    Linux: Real Time Kernel Prototype

    Linux: Realtime Preemption

  20. Another unexplained submission? by retinaburn · · Score: 3, Funny

    First we had a post on Hibernate with no explanation. Then a post on OQO and now we have one on 'Linux'. When will the madness end?!?!? ;)

  21. It is the scope and magnitude of the patch by dmaxwell · · Score: 5, Insightful

    Historically, Linus has never liked merging in great glops of code that touch the kernel in many places. It is disruptive to his maintenance of the kernel and it is disruptive to his lieutenants and their sub projects. The article even hinted at how Linus expects those with a major patch like this to handle things. Montavista needs to break this up into bite size chunks that can be slowly merged into the kernel and gives everybody time to get up to speed. Since it can have a major effect on how the kernel operates, it needs to at least be a compile-time option.

    Linus has even told IBM "no" on occasion. Not hurrying things like this is far better for the quality of Linux than any feature a contributor may want in. Linus isn't flatly refusing Montavista. He most certainly isn't flatly refusing a major feature like hard real time. He is expecting Montavista to participate the way other developers are expected to participate. In particular, Montavista doesn't get to disrupt the work of hundreds of developers because their gargantuan patch was simply dumped in the main dev tree.

    This isn't petty dictatorship. The kernel devs are a battle scarred lot who don't just chuck things in because it would be "cool".

    1. Re:It is the scope and magnitude of the patch by bfields · · Score: 5, Informative
      Historically, Linus has never liked merging in great glops of code that touch the kernel in many places. It is disruptive to his maintenance of the kernel and it is disruptive to his lieutenants and their sub projects. The article even hinted at how Linus expects those with a major patch like this to handle things. Montavista needs to break this up into bite size chunks that can be slowly merged into the kernel and gives everybody time to get up to speed.

      Note also that the patch hasn't really even been submitted for inclusion. The Montavista people posted it to LKML with a lot of warnings, making it clear this was intended as a way to get early feedback on the direction of their project, rather than as an example of a finished implementation.

      So the slashdot headline is more than a little misleading; everybody agrees this is early in the process, and it's no suprise no-one's rushing to apply the patch.

      --Bruce Fields

  22. Poo Poos? by Swamii · · Score: 5, Funny

    What kind of smooth-it-over headline is this? Poo Poo? If this were Bill Gates instead of Linus, we'd say he's "blatantly ignoring", "throwing aside", "totally dismissing". But Poo Poo??

    --
    Tech, life, family, faith: Give me a visit
    1. Re:Poo Poos? by SirTalon42 · · Score: 2

      They never submitted a patch to Linus, they simple posted it on the LKML to get people's opinions, testers, developers, etc. They also had many warnings about the code may not be complete.

  23. News flash: by lpangelrob2 · · Score: 2, Funny

    Tigger said to be hopping mad in protest; Piglet leading soft-spoken sit-in. Honey at 5:00.

  24. There are TONS of non-mainstream things there by MoralHazard · · Score: 2, Interesting

    Has anyone ever taken a look at some of the stuff available in the 2.6 configuration options? Do a 'make menuconfig' and browse through the "General Setup" and "Processor Type and Features" submenus. A bunch of it is wholly useless to 99.9% of the installations out there.

    But it's there as an option, if you want it, like most everything else. Have a tulip ethernet card? Include the driver. If you don't, leave it out. Old BIOS doesn't do ACPI? Leave it out. Don't need a keyboard driver because it's an appliance system? Leave it out.

    Why the hell not just include the real-time business as options? Is the maintenance really that much more challenging?

    1. Re:There are TONS of non-mainstream things there by discord5 · · Score: 4, Insightful

      Let me start out by saying that I'm not a kernel developer, as are most people on /., but I do get to maintain some C and C++ code on a regular basis.

      A lot of the stuff in 2.6 may be useless to most people, but it's there because it's being maintained, is 99% stable and compatible with the current kernel ABI. You see, thread locking in general is a complicated matter, and I can only imagine how complicated all the locking code in the kernel is.

      The RTL patch does some major adjustments to the internals of the linux kernel, and from what I gather has been just dumped into Linus' and co's mailbox. This is simply not done in ANY development project. Maintainers don't accept huge patches that change stuff everywhere on the belief that source code works. Hell, if there's a lock somewhere that isn't freed in some exceptional case your shiny new version of software X grinds to a halt often leaving end-users scratching their heads and developers gritting their teeth.

      I was on a development project once where one of the coders had an inspirational idea and rewrote some shabby but working code into (what he called) clean and efficient code. It was a hefty patch and didn't break the program at first. But due to a bug in thread locking in "some" conditions, only 2 months later we found out some really nasty things about this "clean and efficient" code. Alas, it was too late to revert to our old model, and eventually spent a lot of time debugging and banging our heads against the wall. The guy was fired.

      The point I'm trying to make is that you shouldn't judge people for being wary of accepting large globs of patches for software that already works great. Sure, linux can benefit a lot from this if it provides a foot in the door of telecom, but at the moment it's being used actively in many other areas. This article just seems bent on critisizing Linus for not including something because he believes there may be issues.

  25. Anyone finding this suspicious? by swordboy · · Score: 2, Interesting

    Here's something that Montavista has contributed to the Linux kernel - PRAMFS. A quote (emphasis mine):

    Many embedded systems have a block of non-volatile RAM seperate from normal system memory, i.e. of which the kernel maintains no memory page descriptors. For such systems it would be beneficial to mount a fast read/write filesystem over this "I/O memory", for storing frequently accessed data that must survive system reboots and power cycles. An example usage might be system logs under /var/log, or a user address book in a cell phone or PDA.

    [...]

    2. If the backing-store RAM is comparable in access speed to system memory, there's really no point in caching the file I/O data in the page cache. Better to move file data directly between the user buffers and the backing store RAM, i.e. use direct I/O.


    They've described that they want to use this stuff in a cell phone or PDA, yet have described an NVRAM technology that does not exist (as fast as system memory?). Methinks that they're working with Intel on some new fangled NVRAM, (hint, look for Ovonic). Samsung appears to be working with PRAM as well.

    So this MontaVista file system is a PRAM-File System, maybe...

    --

    Life is the leading cause of death in America.
    1. Re:Anyone finding this suspicious? by tchuladdiass · · Score: 4, Informative

      Actually, it does exist, sortof. If you look at how a Sharp Zaurus sl-5500 is set up, you have 64 meg of ram which is split by the kernel, part of which is used as ram and part is mapped as a block device. This second part survives system reboots and resets (but goes away once the internal battery dies).

    2. Re:Anyone finding this suspicious? by Short+Circuit · · Score: 2, Informative

      Every PC has a small amount of writable NVRAM...it's where my CMOS settings are stored. If you look at the Linux kernel configuration, there's an option to allow writing to this area of memory.

      However, it goes away if your CMOS battery dies. (I believe it's SRAM based.)

      I suspect you're thinking of FLASH memory, which isn't as fast as SRAM, or, generally, even DRAM.

      Here's a good overview on DRAM and SRAM, if you're interested.

  26. Real time Linux could win the house. by grunt107 · · Score: 2, Informative

    Having smart appliances and energy controls securely networked would be a boon to Linux. The real-time kernel would allow speedy monitoring of these type of devices.

  27. Alternatives? by Tellalian · · Score: 3, Interesting

    At the risk of sounding redundant, how is MontaVista's implementation significantly better or different from pre-existing real-time Linux interfaces, such as FSMLabs' RT Linux or DIAPM's RTAI?

    1. Re:Alternatives? by Voivod · · Score: 2, Informative

      Montavista's approach just involves patching the standard kernel to try to improve its behavior. This gets you soft real-time, but getting provable hard real-time is tough via this route due to the complexity of the kernel.

      RT-Linux (and RTAI which is roughly based on RT-Linux but offers a different API) is very different. It runs as a hard real-time micro-kernel which takes over your system and then runs all of Linux as a thread. When you run your hard real-time code it runs in that micro-kernel space rather than Linux user or kernel space. All of Linux gets preempted by your software.

      Here is a great article covering this subject in more detail with tons of links.

  28. The rah-rah supporters are missing the real issue by The_Laughing_God · · Score: 5, Insightful

    There's a hard, probebly irremediable fact about Real Time Operating Systems: the price for being able to [i]guarantee[/i] a specific response time is a [i]slower overall response time[/i]. "Realtime" isn't magic (though, as with all buzzwords, people tend to act like it is). It still must heed all the inherent limitations of the hardware.

    Imagine that you run a pizza shop that MUST meet a certain delivery time guarantee or fail (go out of business--an RTOS MUST meet the guarantee to "be in business" at all). Before you were an RTOS, you could afford to promise pizzas in 15 minutes, with a 90%+ success rate, but if your head will roll if you fail at all, you won't advertise anything better than 30 -or even 60- minutes. I mean, what happens if a custom pizza gets ruined in the oven? You need time to make a new one.

    You'll also need more hardware for the same tasks (more delivery cars), restrict services (smaller delivery area, fewer options), and institute effort-intensive safeguards to assure that no pizza order slips through the cracks. As I said: RTOS isn't magic; adding NEW performance demands won''t magically enable you to do more with less. Quite the contrary, it usually means doing less with more -- but presumably doing it better (assuming that the new requirement *is* better for your specific needs).

    Would you embrace a hardware technology that slowed down your computers, and offered little or no benefit for most (or all) of the tasks you do? There are plenty of examples in he market, and we rightfully shun them as "unnecessary for us". That's the choice Linus faces: most users won't experience any benefit, so why include it in the kernel and make everyone pay the (performance and complexity) price?

    I applaud the availability of a Real-Time patch or variant (I've wanted one for a long time, and I've used Wind River for those applications), but for most people or even 99% of my applications, it's pure downside, even if reworking the kernel to allow its inclusion only decreases performance or complicates programming by 1%.

    Sure, in time --maybe a couple of years-- it may be streamlined until the RTOS burden is miniscule. Until then, Let the Real Time people deal with the issues and limitations inherent in their task. 99.99% of us don't need the unnecessary baggage in our OS. It'd be like mandating infan/child car seats in all cars, whether they carry kids or not.

  29. What is it needed for? by El · · Score: 2, Interesting

    What can an RTOS do that Linux can't that wouldn't be better handled in hardware? If responding to a given event is really THAT time critical, then perhaps you shouldn't be handing the event all the way up to your systems software for a response... In my experience, most problems that people claimed demanded "real time" to solve could be more easily solved by adding more buffers.

    --

    "Freedom means freedom for everybody" -- Dick Cheney

  30. Answer: by warrax_666 · · Score: 4, Informative
    Is the maintenance really that much more challenging?

    Yes. All the other obscure things which only 0.1% of everybody uses, they are small isolated pieces of code (like some random driver). What we're talking about here is adding lots of highly non-trivial code to the core of linux (you know the kernel/ subdirectory of the kernel source) which only 0.01% of people will actually need/use. So, yes.

    I also think it would be quite arrogant of the RT people to expect this to be added without serious thought (and possible reworking). (NOTE: I'm not saying they do/did expect it to, just that it would be arrogant to do so)
    --
    HAND.
  31. Re:Can this be a config parameter? by ceswiedler · · Score: 2, Interesting

    The existence of the code in the main kernel, regardless of whether it is enabled at compile time, affects everybody. It's not like you're going to have a single place with

    #ifdef REAL_TIME_KERNEL

    ...lots of code

    #endif

    It's going to change a lot of things in a lot of places. Ideally, it will make infrastructure changes which benefit everyone, by abstracting certain elements of the code, which then makes its own specific features fit in nicely. Unfortunately, this is very difficult to do with real-time scheduling.

  32. Good for you! by Cryptnotic · · Score: 4, Funny

    Here, have a cookie.

    --
    My other first post is car post.
  33. I would hardly call this "pooh-poohing." by ZuperDee · · Score: 4, Insightful

    Linus merely said "not at this time," and gave his rationale. To me, this hardly qualifies as "pooh-poohing." Therefore, I'd say the article headline is misleading, and designed merely to stir up emotions rather than foster rational dialog.

  34. The Linux kernel is too monolithic for this by Animats · · Score: 4, Informative
    This is where the Linux architecture, with drivers in the kernel, really bites you. Because all the drivers have to be made preemptable, too. This is at odds with the traditional UNIX "top and bottom" driver architecture, with the "top" running as a process and the "bottom" running at interrupt level.

    If you want hard real time and protected mode, you need an architecture like that of QNX, where almost everything runs in user space. File systems, drivers, and networking are all user programs, intercommunicating by message passing. The kernel only handles CPU dispatching, memory management, and message passsing.

    In an architecture like that, everything in user space is preemptable, without any extra work in the system services. There are no long latencies in the QNX kernel; they were all taken care of years ago.

    As Linus points out, though, few consumer embedded devices really need hard real time. Most media-related stuff can paper over delays with buffering. A classic comment is, "You run your web server on Linux. You run your nuclear reactor on QNX".

    Automotive systems, though, really need it. QNX is big in that market.

    1. Re:The Linux kernel is too monolithic for this by swillden · · Score: 2, Informative

      This is where the Linux architecture, with drivers in the kernel, really bites you. Because all the drivers have to be made preemptable, too. This is at odds with the traditional UNIX "top and bottom" driver architecture, with the "top" running as a process and the "bottom" running at interrupt level.

      Actually the Linux architecture isn't as bad as you imply in this respect. Although Linux does follow the traditional top/bottom separation (though in Linux terminology, at least, the "bottom" half is the part that runs in a kernel thread and the "top" is at interrupt level), the fact that the kernel itself is now preemptable means that the bulk of driver code is preemptable.

      The code that runs at interrupt level is not preemptable (except by non-maskable interrupts), but it is kept as tiny as possible. The "bottom half" code (implemented using "tasklets" these days) is all fully-preemptable except where it explicitly turns off preemption. Those sections are gradually being eliminated. In addition, low latency work is finding and eliminating sections of code where the kernel does any kind of extended processing without scheduling.

      This doesn't mean that Linux is a RTOS, but it's a lot closer than you'd expect of a mainstream OS, and it's getting better all the time. QNX has a non-preemptable kernel so lots of stuff has to be in userspace to be preemptable. Linux leaves it in the kernel, and preempts it there. Same net effect.

      There are no long latencies in the QNX kernel; they were all taken care of years ago.

      Linux can't say this, of course, but it's getting there and will probably be able to make the same claim in a few years.

      You run your web server on Linux. You run your nuclear reactor on QNX

      And Linux may never be the best choice for hard real-time. But it will certainly be a reasonable choice, soon.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  35. LKML reference by SmileR.se · · Score: 4, Informative

    Here is the LKML thread discussing this (including explanation of why it isnt accepted into mainline).

  36. No big deal by B1gP4P4Smurf · · Score: 2, Insightful

    Speaking as someone who actually downloaded and tested these patches, I would not worry too much. This stuff is all very rough around the edges, though it has amazing potential.

    If the patches were mature and worked well, and Linus rejected them, it would be news. For now he is just saying "Show me the money". Nothing new, the burden of proof is on people who introduce new features like this to prove them stable, and it just hasn't happened, yet.

  37. Re:What's a spinlock? by Latent+Heat · · Score: 4, Informative
    A spinlock, generally, is a loop of the form

    while (CheckOKtoProceed());

    You see, the program "spins" until CheckOKtoProceed() returns true. The alternative is a call to a Yield(), Wait() or Sleep() function that 1) blocks execution until some condition is satisfied, and 2) tries to yield control to some other pending process while that is happening.

    The trouble with a spin lock is that it hogs the processor. The trouble with the other kind of lock is that it allows another process to proceed, but it may not be safe to allow that on account of a data structure not being in a coherent state of update. A mutex is a kind of lock that by agreement of its use allows only one such process to proceed. A non-mutex lock doesn't offer such protection.

    The argument is that the proposed modification make the kernel much more preemptable and do less spin locking that can kill response, but each element of the proposed modification would need to be checked and tested very carefully that after the change there aren't issues regarding the protection of data structures from multiple processes that could change it along with all kinds of mind-bending subtle bugs that can arise.

  38. inflected English by nomadic · · Score: 3, Funny

    People throw around bloat with great abandon, and usually without any real rationale behind the term.

    My OS is full-featured. Yours has feature creep. His is bloated.

  39. Tell you what by Rogerborg · · Score: 2

    Next time you design a reactor, you go ahead and do it your way.

    --
    If you were blocking sigs, you wouldn't have to read this.