Slashdot Mirror


Linux 2.6.17 Released

diegocgteleline.es writes "After almost three months, Linux 2.6.17 has been released. The changes include support for Sun Niagara CPUs, a new I/O mechanism called 'splice' which can improve the performance greatly for some applications, a scheduler domain optimized for multicore machines, driver for the widely used broadcom 43xx wifi chip (Apple's Airport Extreme and such), iptables support for the H.323 protocol, CCID2 support for DCCP, softmac layer for the wireless stack, block queue IO tracing, and many other changes listed at the changelog"

47 of 444 comments (clear)

  1. Really helped by drsmack1 · · Score: 4, Interesting

    I have this now installed in my dual core AMD and the difference is noticable. X is noticable faster, as is my video editing stuff. Good work guys!

  2. Question for the masses. by SynapseLapse · · Score: 3, Interesting

    I'm still pretty new to the Linux scene (So far I've done a FreeBSD, Ubuntu and Fedora Core 4 installation.), but I do have a question.
    Why are the network drivers part of the kernel? It seems like this would make it more difficult to adopt newer hardware types. Also, since most computers have 1-2 NICs at the most, wouldn't that clog up the kernel with tons of drivers for hardware you'll never use?

    1. Re:Question for the masses. by shird · · Score: 5, Informative

      Modules... Only the modules (read: 'drivers') that are needed are loaded. It needs to be in the kernel because it accesses the hardware (the net card) at a fairly low level.

      --
      I.O.U One Sig.
    2. Re:Question for the masses. by caseih · · Score: 5, Interesting

      Even under windows drivers load into the kernel and normally become part of the kernel proper. Things under linux are similar, but differ from Windows in very important ways. First of all, the overriding philosophy behind the linux kernel is the GPL (well a modified version of the GPLv2) license for the source code. This states that the source code for the kernel and parts of the kernel should always be available. Also, for philosophical reasons associated with the licensing issue, Linus has said that he does not care as much about a binary stable driver API (ABI) in the kernel. Since the source code to the kernel is always available, if you want decent drivers, they should be placed in the kernel source code tree, since drivers really ought to be free and open. Unfortunately this means that a binary kernel driver from one version of the kernel may not work on another. This is done partially to encourage open source drivers and partially to prevent the kernel developers from being tied to design decisions that later prove unwise. But this does pose a problem for folks that want to implement their own third-party drivers in a propriety fashion. NVidia writes a special open source driver that implements a special, stable ABI that it's proprietary, closed-source video driver talks to to overcome this.

      Many have argued that Linus needs to stablize the kernel driver ABI. But on the other hand, by not doing so and encouraging drivers to be open source and in the kernel source tree brings us a large amount of stability that Windows just cannot achieve. Most windows stability problems are not caused by the kernel, which is as stable as Linux, but by third-party device drivers. Anyway it is a trade-off, and one that is hotly contested. Personally, everything I currently use has open source drivers that come with my kernel bundle (Fedora Core). They are loaded on demand, so they don't cause memory bloat. If I was to compile my own kernel, I could choose not to build many of the drivers, reducing the disk bloat too.

      One of the biggest things for me in this kernel release is the Broadcom wireless driver. Kudos to the team that clean-room reverse engineered the driver.

    3. Re:Question for the masses. by hcob$ · · Score: 3, Insightful

      2 options:

      1:
      Compile everything you need for your machine to run into the kernel... no more, no less... then you're good to go. No clutter, no loading at runtime... nothing.

      2:
      You have no idea what you actually need past boot(and root) FS, cpu, and hard drives. Compile everything else as a module(driver) to be loaded when you need it, and voila, no bloat to the kernel, but a few dozen MBs taken up on the HD.

      In the grand scheme of things, a few extra modules for network cards will cause you no trouble. And for reference, most Enterprise level computers have upwards of 4-6 network adapters. Wonderful for redundancy and resiliancy.

      I'll leave you with one bit of parting advice:
      Assuming a minimum configuration on any OS leads you down the path of Microsoft. Knowing your hardware and tweaking it yields unprecidented pride and performance... as well as a unwarrented self importance. The more you learn about OSes... the more you see they are all alike.

      --
      Cliff Claven
      K.E.G. Party Chairman
      Founding Leader of: Koncerned for Egalitarin Governance
    4. Re:Question for the masses. by Anonymous Coward · · Score: 3, Insightful

      Okay, so how frequently do you feel the need to swap out NICs, sound cards, video adapters, or anything else?

      In the grandparent's instance, his hardware may not change for months or years on end because, well, he dosen't want to shut his computers or servers down to experiment with random hardware... Because of this, it might make sense for him to compile the drivers directly into the kernel for a tiny boost in performance and memory utilization... That would make sense for embedded computers, too obviously, and it might be a desireable thing to do.

      For everyone else there are modules, drivers that the kernel can load automatically for hardware that it automagically detected, and it won't load drivers for devices that aren't detected or drivers that the kernel wasn't specifically directed to load. From a user perspective, you can have ALL of the driver modules compiled and most will just eat up a few megs of space in /usr, and everything will work the way it's supposed to, so it's worth eating up a few megs of drive space to be compatible with most everything Linux supports.

    5. Re:Question for the masses. by drsmithy · · Score: 4, Interesting
      Many have argued that Linus needs to stablize the kernel driver ABI. But on the other hand, by not doing so and encouraging drivers to be open source and in the kernel source tree brings us a large amount of stability that Windows just cannot achieve.

      It's worth pointing out that pretty much every remotely mainstream OS *except* Linux manages to work (and work well) with a stable kernel ABI. Including ones considered at least - if not more - stable than Linux, even by Linux zealots, like FreeBSD and Solaris.

    6. Re:Question for the masses. by ookaze · · Score: 4, Insightful

      It's worth pointing out that pretty much every remotely mainstream OS *except* Linux manages to work (and work well) with a stable kernel ABI. Including ones considered at least - if not more - stable than Linux, even by Linux zealots, like FreeBSD and Solaris.

      FreeBSD example then just proves that a stable ABI won't bring more drivers to Linux, thus destroying the GP argument that Linus needs to stabilize the kernel driver ABI.

    7. Re:Question for the masses. by FireFury03 · · Score: 4, Insightful

      It's worth pointing out that pretty much every remotely mainstream OS *except* Linux manages to work (and work well) with a stable kernel ABI.

      Also worth pointing out that much of the stability trouble in Windows is caused by shoddy drivers - FOSS drivers are traditionally more stable than closed drivers (not least because when bugs are found, people with a vested interest in fixing them will often do so rather than waiting for the manufacturer to get their finger out).

      Whilest a stable ABI may result in more drivers being made available, I fear it could lead to a lot of "Windows quality" drivers. And if closed drivers are officially legitimised, many companies will refuse to release open drivers since there is very little in it for them. At the moment, many of the open drivers are there because the vendor believes that releasing a binary driver is legally dubious at best - legitimise binary drivers and this motivation goes away.

      Anyone who's dealt with bugs in the nVidia drivers will know of the problems of closed development - I've reported bugs that have taken years for nVidia to fix which I would've been happy to try and fix myself if only the code was open.

  3. Go Linux! by Umbral+Blot · · Score: 4, Insightful

    It's good to know that even in this day and age of faster and faster computers there are still people who care about speed and efficiency instead of simply waiting for hardware to solve their problems for them. I do have one tiny complaint though, and it is that some of the performance gains are only possible by using new system calls. This is bad for three reasons:
    1- More work for developers, some of whom may never learn about these faster calls.
    2- Old applications can't benefit
    3- Applications that wish to be backwards compatible can't benefit
    Obviously though it is necessary to write new functions on occassion; for example when the new function is worse than the old function is under some circumstances. It may be that all the new functionality is of this type, but I don't have enough information to know for sure.

    1. Re:Go Linux! by freralqqvba · · Score: 5, Informative

      sendfile(2) is now a call to splice() so programs that use the old syscall will benefit as well and without modificaiton.

    2. Re:Go Linux! by ip_fired · · Score: 3, Informative

      The kernel is written in C, and so are those system calls. I don't believe you can overload a C function.

      --
      Don't count your messages before they ACK.
    3. Re:Go Linux! by TCM · · Score: 3, Insightful
      It's good to know that even in this day and age of faster and faster computers there are still people who care about speed and efficiency instead of simply waiting for hardware to solve their problems for them.
      Another way of saying this: It sucks to know that even in this day and age of faster and faster computers there are still people who cut corners and use specific hacks to gain speed instead of simply building clean and well-designed systems and let the hardware do the work.

      Just saying..
      --
      Of course it runs NetBSD. BTC: 1NT7QvbetmANwaMzhpVL6
    4. Re:Go Linux! by pavon · · Score: 4, Informative
      Obviously though it is necessary to write new functions on occassion; for example when the new function is worse than the old function is under some circumstances.

      That is exactly why it was done. More information about can be found at kerneltrap: here, and here. It was also previously on slashdot, although you would be best to skip that - it has more misinformation than the other kind.

      In short, all the known ways of implementing zero-copy within the existing API's cause the most common usage cases of those API to be slower than they are now. Therefore, it made more sense to export this new API for the applications where speed is critical.

      In the the first kernaltrap article, Linus also explains why splice is different from sendfile, contrary to the posts here claiming they are essentially the same.

    5. Re:Go Linux! by waveclaw · · Score: 4, Informative
      The kernel is written in C, and so are those system calls. I don't believe you can overload a C function.


      There is no overloading going on here. Overloading is to create a new function with the same name, but taking different parameters.

      Ahem. The original function, sendfile(2), was rewritten to call splice() instead of doing something else.

      Everybody that wrote code that used the old function now has to deal with splice() running instead of the old function's logic.

      Just to hammer it home:
      Old - app -> sendfile(2) -> some logic -> return to app
      New - app -> sendfile(2) -> splice() -> splice's logic -> return to sendfile(2) -> return to app

      With the Linux kernel, as this exepmlifies, you can improve the original code and get everyone (well, those to lazy to revert the changes) to use it. In this case you have a fixed API (sendfile(2) which is well known and published) so you don't just want to tell everybody to recompile with called to splice().

      See the difference? Feel the difference.

      The kernel is GPL and thus the actual source code used to compile the binary kernel you use is available to you. With a closed source kernel you might be able to purchase an SDK with linkable binaries and some (probably undocumetned) header files. Programmers in this situation need things like function overloading and class inheritence just to do anything. One way of looking at the history of languages like C++ is as a technical solution to the ethical problem of closed source programming. Those languages focus on extending on the outside. With OSS you can usually replace, fix and improve on the inside. BSD and GNU differ on a the point of GNU wanting everyone to share the source to those fixes if they share the resulting binaries. But I digress.

      And I can't wait to see if this breaks something.
      --

      "You cannot have a General Will unless you have shared experiences. You cannot be fair to people you don't know."
    6. Re:Go Linux! by jrockway · · Score: 4, Funny

      > A real macro system and overloading would probably be nice for kernel dev.s everywhere.

      Like LISP? That's what they used to use, but C was chosen for UNIX, and UNIX caught on big time, so C is the language now. I think it's about time to write an OS (kernel + tools) in LISP, so we can return to the good-old-days of Lisp machines.

      --
      My other car is first.
  4. In case of slashdot, break mirror by TrueKonrads · · Score: 4, Funny
    --
    Lone Gunmen crew.
  5. some highlights from the changelog by doti · · Score: 5, Informative

    Some stuff I found interesting on the human-friendly changelog.

    Block queue IO tracing support (blktrace). This allows users to see any traffic happening on a block device queue. In other words, you can get very detailed stadistics of what your disks are doing. User space support tools available in: git://brick.kernel.dk/data/git/blktrace.git

    New /proc file /proc/self/mountstats, where mounted file systems can export information (configuration options, performance counters, and so on)

    Introduce the splice(), tee() and vmsplice() system calls, a new I/O method.
    The idea behind splice is the availability of a in-kernel buffer that the user has control over, where "splice()" moves data to/from the buffer from/to an arbitrary file descriptor, while "tee()" copies the data in one buffer to another, ie: it "duplicates" it. The in-buffer however is implemented as a set of reference-counted pointers which the kernel copies around without actually copying the data. So while tee() "duplicates" the in-kernel buffer, in practice it doesn't copy the data but increments the reference pointers, avoiding extra copies of the data. In the same way, splice() can move data from one end to another, but instead of bringing the data from the source to the process' memory and sending back to the destination it just moves it avoiding the extra copy. This new scheme can be used anywhere where a process needs to send something from one end to another, but it doesn't need to touch or even look at the data, just forward it: Avoiding extra copies of data means you don't waste time copying data around (huge performance improvement). For example, you could forward data that comes from a MPEG-4 hardware encoder, and tee() it to duplicate the stream, and write one of the streams to disk, and the other one to a socket for a real-time network broadcast. Again, all without actually physically copying it around in memory.

    --
    factor 966971: 966971
  6. Where is 2.7? by Anonymous Coward · · Score: 5, Insightful

    A hell of a lot of this stuff seems to me to be the sort of code that should be going into the 2.7 stream, not 2.6. The earliest days of Linux had revisions X.Y.Z. If Y was even, it was a "stable" branch, and could generally be considered safe for production work. If Y was odd, it was a "development" branch, and could break things badly.

    This was a major boon for Linux: if you needed the bleeding edge, you could get it, whilst acknowledging the risks in doing so. If you needed something stable, again, you could get it. Now? It seems that the supposedly stable kernel is right out there on the bleeding edge ...

    1. Re:Where is 2.7? by x2A · · Score: 5, Informative

      The stable/development branches might be a nice idea in theory, but in practice it doesn't work. Distros would ship, for example, a "stable" 2.4.xx kernel, except it wouldn't actually be that. They would spot nice features in the 2.5 kernel that they wanted to offer their users, and so back-port them... and any other nice patches floating around the net while they're at it. The result being that the kernels that ship with distros were so heavily modified, that stability (from one machine to another) went right out of the window. You couldn't go to kernel.org and download an updated kernel, as without all the patches, it wouldn't work. So you had to stick to the distro's kernels.

      So instead, the 2.6 goal is to have development/stable parts of the cycle, rather than seperate branches. Roughtly: patches that could break things get submitted at the beginning of the cycle, and -pre1/-pre2 tarballs are released. If you want bleeding edge, you go here. Release candidates are released, where developers get chance to fix bugs etc in the code. Then, any code that's still [known to be] buggy gets dropped for the final release (eg, 2.6.17). The developer can work on it, and try add it again during subsequent cycles. When it works, it can be included in a final release.

      During this cycle, security and other urgent bug fixes take place in the ultra-stable branch, with version such as 2.6.16.1, 2.6.16.2.

      (This is the rough idea I believe, there could be some slight inaccuracies in how it actually takes place, I haven't followed it 100%, but this should be close enough to get the right idea).

      --
      The revolution will not be televised... but it will have a page on Wikipedia
    2. Re:Where is 2.7? by iabervon · · Score: 5, Informative

      That was the theory. But in practice, if Y was even, the kernel was obsolete, while if Y was odd, the kernel was broken. Except, of course, 2.even.0, which was actually stable, but broke compatibility with the previous kernel that worked. And occasionally, 2.even was kept up-to-date because nobody could use 2.odd for development, because it didn't work at all. You could tell that the old model didn't actually work, because no distribution shipped any kernel that used that model; they all shipped 2.even with an arbitrary set of patches (generally hundreds) from 2.odd and elsewhere. With the new model, distros are shipping kernels with only a few patches, and those patches are getting merged upstream.

      The stable kernels aren't remotely on the bleeding edge; they contain only features which have been tested over the past three months, after being filtered out of the bleeding-edge development as being things that have already stabilized and stand a good chance of being proven in three months. It's effectively very similar, except the development series isn't left known-broken and the stabilization process happens on a quick schedule, with stuff that isn't ready pushed off to the next cycle rather than delaying the current cycle. Also, the version numbers change by less (development gets -mm, -rc, or -git; stable series change the third digit by one instead of the second by two; and bugfix releases change the fourth digit instead of the third).

    3. Re:Where is 2.7? by 10Ghz · · Score: 4, Interesting
      This was a major boon for Linux


      Or bane. The "old way" meant that the vanilla-kernel (kernel offered by kernel.org) was stable. But new features took a LONG time to appear in the vanilla-kernel. But users and distros still wanted those advanced features that were not part of the kernel (yet). What happened was that distros offered their own vendor-kernels, that were VERY different from vanilla-kernel. Distros then spent their time and energy fixing their own vendor-kernels, instead of vanilla-kernel.

      This new system changes things so that new features are added to the vanilla-kernel, which means that the difference between vanilla and vendor-kernels is not that big. The distributors can focus on stabilizing the kernel, instead of adding new features to it. And porting those fixes to vanilla is a lot easier than porting changes in the old system. This means that if you want to use REALLY stable kernel, you should use the vendor-kernel.

      In short: this new system means that things progress a lot faster for everyone, with new features appearing in the kernel. And we can still have the stability we want if we use the tested and patched vendor-kernels.
      --
      Lesbian Nazi Hookers Abducted by UFOs and Forced Into Weight Loss Programs - -all next week on Town Talk.
  7. Linux is for other devices too by EmbeddedJanitor · · Score: 4, Insightful

    While the "who cares about software efficiency, the hw is getting faster" attitude might be OK for desktop PCs, it does not apply to handheld/mobile devices (which make up a huge, and ever growing, % of all Linux devices). Being able to use a slower CPU (or use a fast one very efficiently) makes for reduced power consumption == smaller devices == longer battery life. Nobody wants a cell phone with a 2 pound battery that only runs for 1 day.

    --
    Engineering is the art of compromise.
  8. Microkernel anyone? by argoff · · Score: 4, Informative
    Why are the network drivers part of the kernel? It seems like this would make it more difficult to adopt newer hardware types. Also, since most computers have 1-2 NICs at the most, wouldn't that clog up the kernel with tons of drivers for hardware you'll never use?

    This is the essence of the Microkernel debate. http://en.wikipedia.org/wiki/Microkernel/ The truth is that the Microkernel model probably is a better design, but in terms of when the Linux kernel was starting out - its implementation simply wasn't pratical. It didn't help that the people who thought they knew how to build a better kernel decided to try and intellectually brow-beat Linus into doing it instead of implementing it themselves and putting it under the GPL. This led to a lot of bitterness and resentment between the two camps. The HURD http://en.wikipedia.org/wiki/Hurd project is a GPL microkernel project, but it simply wasn't managed as well as Linus managed Linux.

    I think over time, things eventually will move to a microkernel model even though there are other ways to emulate some of their security and flexability benefits - like xen http://en.wikipedia.org/wiki/Xen

    1. Re:Microkernel anyone? by ArbitraryConstant · · Score: 4, Insightful
      Why are the network drivers part of the kernel? It seems like this would make it more difficult to adopt newer hardware types. Also, since most computers have 1-2 NICs at the most, wouldn't that clog up the kernel with tons of drivers for hardware you'll never use?
      This is the essence of the Microkernel debate.
      It has nothing whatsoever to do with the microkernel debate. The two issues are completely orthogonal to each other. The microkernel proponents claim the driver should be a process running outside the kernel, which has nothing to do with the number of drivers you have sitting around, or how difficult it is to adopt newer hardware types.

      Either way, you've got a ton of drivers sitting around that you'll never use. They don't clog up the kernel, since the kernel image rarely contains many drivers. Instead, most Linux distros use modules that get loaded as needed. On a microkernel, they would be driver binaries that would get run as needed. They clog things up to exactly the same extent; they sit around on the hard drive doing nothing.

      Either way, it's hard to add new drivers to old kernels. This is not a result of the fact that drivers are in the kernel, but of the fact that Linus refuses to use a stable driver API. This would preclude driver compatibility between versions just as effectively on a microkernel as it does now.

      As I said, the two issues are unrelated.
      --
      I rarely criticize things I don't care about.
  9. Re:Video Editing? by Anonymous Coward · · Score: 5, Informative

    Insightful? How about Kino or Cinelerra or Lives or Mainactor?

  10. Sounds good by goodenoughnickname · · Score: 4, Funny

    Sounds good -- how much does it cost?

    Sincerely,
    The New Guy

  11. Re:Nice by Frogbert · · Score: 5, Funny

    2.6.16! You're crazy. I'm still holding back on 2.4.10 until the dust settles.

  12. "splice" - because Microsoft did it? by Animats · · Score: 4, Interesting

    The "splice" system call seems to be an answer to one of Microsoft's bad ideas - serving web pages from the kernel. At one point, Microsoft was claiming that an "enterprise operating system" had to be able to do that. So now Linux has a comparable "zero copy" facility.

    "Zero copy" tends to be overrated. It makes some benchmarks look good, but it's only useful if your system is mostly doing very dumb I/O bound stuff. In environments where web pages have to be ground through some engine like PHP before they go out, it won't help much.

    The usual effect of adding "zero copy" to something is that the performance goes up a little, the complexity goes up a lot, and the number of crashes increases.

  13. not like that by r00t · · Score: 4, Informative

    This is really just a way for app code to manipulate data without needing to have it copied or memory-mapped.

    Linus refused the FreeBSD-style zero-copy because it is often a lose on SMP and with modern hardware. Page table and TLB updates have huge costs on modern hardware.

    If you do like the Microsoft way, use Red Hat's kernel. The in-kernel server works very well.

  14. Re:support for the h.323 protocol, quite unlikely by nick+this · · Score: 4, Informative

    I read that as ip conntracking to allow videoconferencing devices that follow the h.323 standard to be natted.

    obtw: your pedant bit is apparently stuck high. just a fyi -- didn't know if you realized it. :)

  15. Re:Missing driver? by WhodoVoodoo · · Score: 5, Informative


    try hitting '/' on make menuconfig, type ov511 hit enter. That's a hot tip that's saved me quite a bit of time...
    It'll find it if it's there.

  16. Re:Great, how about stable firewire support someda by Solra+Bizna · · Score: 5, Funny

    The above comment has been marked WORKSFORME, and is now closed.

    -:sigma.SB

    --
    WARN
    THERE IS ANOTHER SYSTEM
  17. Re:OK, so where are they? by tomstdenis · · Score: 4, Interesting

    You listed I/O schedulers. I think the multi-core bit talks about a PROCESS scheduler. Two different things. Linux already has specific support for Intel's HTT bullshit and understands NUMA. Understanding multi-core is a good move up.

    If you have a 2P dual-core setup the best performance for two independent tasks would be spread to both chips. Specially in the AMD camp. That means each task gets a full memory bus to themselves. The trick is to pick up when two tasks have shared memory between each other and schedule that for one chip. Specially on the Intel side of things with their massive shared L2 cache.

    Tom

    --
    Someday, I'll have a real sig.
  18. Re:support for the h.323 protocol, quite unlikely by nick+this · · Score: 3, Informative

    Unlikely or not, that's what it appears to be. h.323 conntrack nat helper

    This patch (or module, actually) comes with an H.323 decoding library that is based on H.225 version 4, H.235 version 2 and H.245 version 7. It is extremely optimized for Linux kernel and decodes only the absolutely necessary objects in a signal. ... The total size of code plus data is less than 20 KB.

    Doesn't look like a gatekeeper or anything, that looks like an honest-to god ipconntrack nat implementation.

    For the other responder to my initial post. I have taken your offer into consideration but have decided to decline.
    lol.

  19. Re:Video Editing? by Bent+Mind · · Score: 3, Informative

    I've been doing video editing with Avidemux. It's a nice little program for Windows, OSX, and Linux.

    --
    Request a Linux Shockwave player here: http://www.macromedia.com/support/email/wishform/
  20. Indeed, Airport Extreme support is HUGE by RedBear · · Score: 5, Insightful
    Woohoo, Broadcom 4300 drivers! I hope they work. ...I wish this had been brought to my attention before 1 A.M.

    I'm somewhat shocked that nobody else has pointed out the new Broadcom 43xx/Airport Extreme support. That's the one thing that grabbed my attention in the whole paragraph. Not having support for Apple's built-in wireless hardware has been a showstopper for a lot of people to even consider trying out Linux on a Mac, especially the portables. This driver will open up several million possible new computers for Linux to be installed on, since at this point the wireless hardware was about the last incompatible piece of hardware on the Mac side. This is a very big deal for anyone with Mac hardware or anyone planning to buy a Mac, and for all the geeks who are already running Linux on their Mac.

    Very cool.

  21. That and by Sycraft-fu · · Score: 4, Informative

    For kernel operations, you want everything pretty efficient. You want it as fast as possible and you don't want a lot of extra code hanging around. Unfortunately, the higher level a language you use, the more inefficency there is. For most programs it doesn't matter. They are either not the sort of thing that needs speed (like a word processor) or one where you can optimize the small part of the code that takes most of the time (like a game). However the kernel is a little different. Everything in there is time critical essentially.

    C is the best compramise. While assembly might give you the theoritical best code, it'll big a giant mess to try and totally unmaintainable. Might actually be slower and larger for it. C is pretty good because it's easy enough to generate deceant code in, but it isn't much higher up the abstraction chain so it compiles quite efficient.

    You have to remember that object orientation and such are all human creations. Processors don't think in objects, for that matter they don't really even think in functions. They think in memory locations, and jumps to those locations. Doing OO code means a whole messy layer the compiler has to go through to translate that in to something the processor actually understands.

  22. Re:module shotguns by BrainInAJar · · Score: 4, Insightful

    there is still not a true, separate driver interface API.

    Sure there is. There's just not a consistent ABI, and that's on purpose.

    If you're contributing a driver, GREAT. It'll compile against the currently installed kernel just fine.

    If it's closed-source, go die. The kernel's GPL, not lGPL

  23. Broadcom 43xx HOWTO: by cbhacking · · Score: 5, Informative

    Haven't tried the release of 2.6.17 yet, but rcX versions required extracting the firmware for your Broadcom card from a binary such as bcmwl5.sys (Windows driver). The tool bcm43xx-fwcutter does this.

    I'm not an Ubuntu guy, but this reference might be useful to anybody trying to make the new Broadcom Wifi driver work in Linux. Very easy steps, and most non-Ubuntu users should find it easy to adapt for their specific distros.

    --
    There's no place I could be, since I've found Serenity...
  24. Re:support for the h.323 protocol, quite unlikely by rodac · · Score: 3, Interesting

    Bloody hell!

    They managed to squeeze both PER and also H225/235/245 into just 20kbyte of object code?!
    (why implement h235? thats crypto and wouldnt work unless you know the keys?)
    That is VERY impressive.

    My PER decoder alone ( http://anonsvn.wireshark.org/wireshark/trunk/epan/ dissectors/packet-per.c ) is way larger than that, and that is just aligned PER decoding (ok with some unaligned PER additions recently) and that one itself is >>20kbyte. Adding 225/245 into the mix. Impossible!


    I am very impressed. Very impressed.

  25. Re:module shotguns by wertarbyte · · Score: 5, Informative
    Many a linux distribution I've used (most noticeably Debian) applies the "shotgun" approach to module-loading because the hardware detection and hotplug methods are so convoluted and undependable. Kind of defeats the purpose of loadable modules if the distribution simply loads everything under the sun to see what sticks.
    Obviously you haven't used Linux for a long time. Modules are not loaded to detect hardware, instead the hardware acquires the driver module: The kernel identifies hardware via PCI or USB device ids, which are also stored in the modules. So Hotplug (and newer versions of udev) can load the appropiate module once hardware is added to the system.
    Worse, many modules aren't smart enough to determine "hey, I'm a driver for [some non-removable component]. If I can't find my hardware, maybe I should print an error to ksyslogd and unload myself."
    The driver will not be loaded if there is no hardware, unless you explicitly tell your system to do so.
    --
    Life is just nature's way of keeping meat fresh.
  26. Re:Video Editing? by zsau · · Score: 3, Funny

    Using a graphical editor? I edit my videos by converting them to a series of jpeg images (one per frame) and using ed to edit them! Damn efficient, quality results.

    --
    Look out!
  27. Re:Video Editing? by miracle69 · · Score: 3, Informative

    I recently ran across jashaka which is also cross-platform.

    --
    Linux - Because Mommy taught me to Share.
  28. Re:module shotguns by FireFury03 · · Score: 4, Informative

    Sure there is. There's just not a consistent ABI, and that's on purpose.

    If you're contributing a driver, GREAT. It'll compile against the currently installed kernel just fine.


    Untrue I'm afraid. If your modules aren't in-tree then they *will* break every so often because the kernel API is not stable. Especially under the 2.6 development model - under the previous 2.4/2.5 model you were pretty much guaranteed that API breakages would only be happening in the 2.5 tree, now they happen at any point in the 2.6 tree. (Yes, I do know this stuff - I work on out-of-tree kernel code).

    There is some arguement that all drivers should be in-tree, and for common hardware it is definately a Good Thing to have the drivers in the tree - as the API changes then the person implementing the API change will fix up all the in-tree code that uses that API.

    For very specialist and expensive hardware it poses a problem though: the person who does the API change won't have the hardware to test with, and probably all the people who use that hardware are using enterprise distributions so breakages to the module won't be spotted for a long time. It's hard for the hardware vendor to track these kinds of updates and perform the necessary regression testing.

  29. There are valid uses for a GOTO by Dan+Ost · · Score: 4, Informative

    I agree that using GOTO is a bad idea when another control structure is adaquate,
    but, at least in C, there are times when using GOTO is the most natural and,
    unequivically, the best choice.

    Off the top of my head, I can think of two situations where using a GOTO is
    the best solution:

    1. breaking out of nested loops. In C, the break command can only break
    out of a single loop level. If you need to break out of 2 or more loops, you
    can play an ugly game of setting and checking state flags at each level
    of looping or you can simply create a label at the exit point and use
    GOTO to get there. (sometimes you can wrap your loops as a function call,
    but that's often the ugliest solution)

    2. shared cleanup code. In a function with multiple exit points, instead
    of doing cleanup at each exit point, it is often clearer to set your
    return value and then GOTO a label that handles all cleanup before
    returning.

    Be cautious when using GOTO, but don't be afraid of it. Learn to
    recognize when GOTO is appropriate and when it should be avoided.

    --

    *sigh* back to work...
    1. Re:There are valid uses for a GOTO by Dan+Ost · · Score: 5, Informative

      1) If you can create a condition where a goto is to be placed, you can add that same condition to the top loop in the nest and let it exit out gracefully.

      If that leads to clearer code, then in the cases where you can do that, fine. Do that.

      However, there are situations when a condition doesn't make sense until you've already
      entered the nested loops at least once (for example, when allocating lots of chuncks of memory,
      you can't test to see if you've successfully allocated memory until after you've tried to
      allocate memory). Also, if there are several conditions that might require a break, but
      they can all be handled the same (at least until after you break out of your loops),
      do you really want each one to be tested at every loop test? Think how big and confusing that
      would make your continuation test for your outer loops.

      2) Use a clean-up function. It will return to the correct place without all the spagetti code.

      There's nothing wrong with using cleanup functions if they are convienent for your
      particular purpose, but if you have to free 11 objects before returning, then you'll
      need to pass all 11 to the cleanup function each time you call it. I don't know about
      you, but I usually find functions with 5+ arguments to be ugly. I would rather simply have
      a 'goto cleanup' that jumps to a label that does all the cleanup in place. An acceptable
      compromise would be to define a macro that does the cleanup in place but hides it from casual
      code inspection, thus keeping the code clear, but avoiding the use of GOTO.

      Using GOTO in the manners I've described will not lead to speghetti code since the flow of control
      will be clear and uni-directional (the antithesis of speghetti code). In case (1), the use
      of GOTO is equivalent to raising an exception in Java, C++, or Python from within the loop and
      capturing the exception outside the loop (idioms commonly accepted in all three communities).
      In case (2), the use of GOTO maps multiple exit points to a single exit point. If you feel
      that these techniques qualify as speghetti code, then I would suggest that you've never
      seen real speghetti code.

      When Djikstra wrote "Goto considered harmful", he was talking about using GOTO to jump outside
      the scope of the current function, something not possible in with C's goto (C's goto can only
      jump to a label within the current function). See BASIC and PASCAL (I think) for examples of GOTO that
      can jump anywhere in the program.

      --

      *sigh* back to work...