Slashdot Mirror


Linux Gains AltiVec Support

Anonymous Coward writes: "Terra Soft today [Note: Thursday] announced development support for AltiVec (a.k.a. "Velocity Engine"), saying that Black Lab Linux running on a PowerPC G4 may offer up to a '150-300% increase [in performance], with some Linux applications running in excess of 10 times (1,000%) their normal performance.' The AltiVec-enabled Black Lab Linux offers the GCC compiler with support for the AltiVec C and C++ extensions, as well as Linux-kernel run-time support for AltiVec enabled applications."

22 of 179 comments (clear)

  1. Re:AltiVec is unnecessary by Anonymous Coward · · Score: 2

    I strongly disagree with you on this.

    The linux kernel isn't going to get "bloated" in any way. Sure, there might be more source to download, but the size is determined about what elements you want in it.

    Also, Altivec and other SIMD operations are handled by the compilers (when the code is compiled), not the kernel. The kernel could care less what SIMDs the chip has on it.

    OpenGL isn't handled by the Linux kernel either.

    And none of the above APIs are in any way connected to a kernel of any operating system known to mankind. Windows Mediaplayer stuff is an application. DirectX is a "layer" that goes over windows, so its klunkyness doesnt get in the way.

    SIMDs are good things. It lets you break off a bit from the chips original instruction architecure and add new features, without breaking backwards compatibility. Sure, Intel, AMD, and Motorola use them for marketing reasons too, but those are just perks.

    They also enable you to set up dedicated data pipelines to a part of the chip that will in no way slow down or take away bandwidth from the other elements of the CPU. SIMDs are too complex and too good for somebody from the marketing department to dream up :)

    The downside of this is everybody has their own little SIMD. Using Open Source, we can just tell our compiler to compile it with whatever SIMD we have and it'l optimize the code for that. So its not -that- bad.

  2. Re:How do they do this? by Darchmare · · Score: 2

    Be's excuse is stupid. Apple is also a new company in that they're not spending money on stupid projects that lose them money. When a company is going out of business, do you think they're going to subsidize Be's development? Nope. Given that nobody else has had any problems with Apple's hardware, and Apple itself has brought forth not one but _2_ open-source operating systems, Be's argument is more than a little silly at this point.

    Be has some ass-kicking technology, but the fact is that they can't stick with any business plan for an extended amount of time. They figured it'd be financially more beneficial to switch to X86 (and may have been right, at the time at least - no they're moving to 'IAs'), but didn't need to use the "Apple stopped us" excuse. Why should Apple stop them? They make a hardware sale anyhow, which is better than someone buying a PC, right? They just weren't willing to subsidize Be's development.


    - Jeff A. Campbell
    - VelociNews (http://www.velocinews.com)

    --

    - Jeff
  3. Re:Linux vs Sun servers by Darchmare · · Score: 2

    Signatures have traditionally been an 'acceptable' place to put a link or short description of a person's site. It's no longer than anyone else's sig, so what's the problem?

    Now, if it were spam - ie. the entire post was made for the sole purpose of promoting the person's site - then that's another thing. I handle spam as part of my job and I don't exactly view it favorably. But this is just a sig...

    - Jeff A. Campbell
    - VelociNews (http://www.velocinews.com)

    --

    - Jeff
  4. Re:That's how they make their money. by Darchmare · · Score: 2

    Um, the 'X' stands for 10. I believe latin predates the X Windowing system by at least a few millenia.

    And yes, sales of Mac hardware subsidize OSX development. What's so wrong with that? That's how companies work - they make money, and reinvest some of it into their operations. Big deal. Nobody is forcing you to buy Mac hardware - if you don't like it, buy something else. Do you flame any other make and model of car other than the one you drive?

    I can say this: Zealotry is never pretty.

    Also, it sounds to me like you don't know much about Quartz, either, as it has some decent features X would do well to emulate. Each system has its strengths and weaknesses.


    - Jeff A. Campbell
    - VelociNews (http://www.velocinews.com)

    --

    - Jeff
  5. Re:Quake 3 benchmark by Graymalkin · · Score: 2

    The ATi hardware isn't locked down or anything. ATi Provides VERY good colour control which many publishers and graphic arts people adore, these people also adore their Macs. The G4 has a 2x AGP slot that will work with any AGP video card, providing the video card has Mac drivers and extensions. By September when alot of the new video chipsets are out there will almost certainly be Mac versions of the hardware, these only require a different ROM and drivers.

    --
    I'm a loner Dottie, a Rebel.
  6. Commodity? by Graymalkin · · Score: 2

    Will MPPC chips become commodity in the next year? One can hope so. I'm a big fan of the PPC architecture, I'd love to see it become a little more widespread. It would be nice to click through buycomp.com and see MPPC 750 and 7400's along with motherboards for them. I think a great use for G3/4 MPPC chips on Linux (or just about any other free Unix) would be media production. High power graphic workstations are getting more commong but they are still high priced pieces of equipment, the media companies have just now been able to afford them in larger numbers due to their relative success. The free Unicies make a real good bed for media to come visit. Open sourced kernels lend themselves to a good deal of optimization which will result in faster system performance in an area where time is money. I don't know if Linux is mature enough yet but FreeBSD on a render-farm of G4s would kick some ass, like the one from The Matrix but larger (and on MPPC 7400's).

    --
    I'm a loner Dottie, a Rebel.
  7. C extensions by Straker+Skunk · · Score: 2

    Most cool!! Linux has Supercomputer Power now!!

    (tongue-in-cheek, yah, but cool nonetheless)

    I'm wondering... what do the C extensions look like? C++ has the STL vector types (also a matrix type, right?) but C just has arrays of int/float/double. Is there an API reference anywhere? Is an API even involved? What would AltiVec-enabled C code look like?

    --
    iSKUNK!
  8. Re:Wow. by Pope · · Score: 2

    Intel's MMX, 3DNow!, and other extensions to the x86 instruction set demanded re-writes too, ya know.
    Now if they can just get rid of these friggin tiny keyboards!! (I'm trying right now in my new G4, and man does it suck)

    Pope

    --
    It doesn't mean much now, it's built for the future.
  9. Re:So when can I buy... by MidKnight · · Score: 2

    > x86 will always be the commodity platform

    The commodity platform for the desktop, sure. But it's kind of short-sighted to think that desktop computers are the hot commodity for the future, isn't it?

    It's amazing that x86 has lasted this long (read: the WinTel alliance was a stroke of genius), but the design is _old_ and stretched terribly thin. I say good riddance.

    --Mid

  10. Re:Woohoo! by starman97 · · Score: 2

    Can Altivec do register moves between the GPR, FPR and Alti-Vec unit without having to do a Store/Load to memory/cache? One of the real pains of PPC is that it can't do a direct 64bit single beat read/write without using the FP registers, but you cant directly manipulate them, you have to do 2 32-bit stores then a double float load, then a double float store to your 64bit bus device.. its slow. PPC EC parts dont have floating point and have no method if accessing 64bit devices except through cacheline fill/castout bursting, not very helpful for I/O devices.

    --
    Starman97@Gmail.com (bring it on spammers)
  11. Re:A half a million questions by dburcaw · · Score: 2

    Where do you get this cruft? Do you see an Apple quote in this PR? Nope. Motorola has been working on AltiVec patches for gcc too, you know. (It is their technology). And yes, we helped them (Motorola) out some.

    Go download the gcc patches and put them in "Phil-14's Linux OS". The GPL allows that, and we welcome it.

    Regards,
    Dan

    Dan Burcaw

  12. Re:links to the patches by dburcaw · · Score: 2

    The .ppc.rpm files on altivec.org are from us and is what is shipping with Black Lab Linux.

    altivec.org is basically the starting point for everything AltiVec, so we're putting the RPMs there and linking that site to our web page, etc.

    rpm -qi on those .ppc.rpm's should show our information in the Vendor and Distribution fields.

    Regards,
    Dan

    Dan Burcaw

  13. Re:Woohoo! by MicroBerto · · Score: 2
    I wouldn't be a bit surprised if someone is working on an optimized X that uses G4 altivec acceleration- that would seem to be a no-brainer.

    heh, with the X Project, i don't think ANYTHING seems like a no-brainer!

    Mike Roberto (roberto@soul.apk.net) - AOL IM: MicroBerto

    --
    Berto
  14. Re:Woohoo! by friedo · · Score: 2

    IBM is working on their new PowerPC Open Platform boards, which are very cool. Capability for an arbitrary number of CPUs and runs on a PCI bus.

  15. What these four letter acronyms mean by yerricde · · Score: 2

    Not 3dfx. (3dfx makes the Doodoo, erm, Voodoo graphics cards. At least they open sourced Glide.)

    YM 3DNow! the streaming SIMD extended instruction set AMD added to the K6 chips and that Intel copied in Katmai/PIII.

    BTW, SIMD = single instruction multiple data. First, instruction decoding limitations produced RISC (reduced instruction set CPU). Then the increasing popularity of graphics apps brought about SIMD (apply the same filter to a whole bunch of filters). Clock speeds rose so much that even the scheduler in a RISC chip was having trouble keeping up, leading to VLIW (very long instruction words) used in Intel's Merced Itanium and (internally) in Transmeta's Crusoe.

    --
    Will I retire or break 10K?
  16. A half a million questions by GodSpiral · · Score: 2

    How easy are these c and C++ libraries to use?

    Are they saying any vector type processing can be easilly rewritten, and so lots of aps can be enhanced?

    I vaguely know altivec is cleaner than the x86 simd stuff, but can the same thing be applied to mmx, 3dnow etc... ?

    what parts of their kernel gain performance?

  17. Re:Too bad their extensions to C++/C are really ba by Chainsaw · · Score: 3

    You are either a bad C++ programmer or just haven't heard of these things: 'vector' is a member of the C++ standard template library and is therefore not added especially for AltiVec. The STL seems to be a good place to insert these assembler optimizations. Since the class abstraction is pretty high, you can do a lot of speed-increasing operations in the dark dwellings inside the classes. All applications written in standard C++ will benefit from this.

    --
    War is one of the most horrible things a human can be exposed to. And one of the worlds largest industries.
  18. Re:Keep bringin the goodness by Mondragon · · Score: 3

    The speed benefit comes from the processor, not the applications, as it were, although they must be optimized for it. Any OS that runs on a PPC 7400 (G4) can take advantage of the AltiVec instructions. So, x86 linux won't get this benefit. An interesting thing to know would be who's patches to GCC these are (I haven't looked at the web site). Apple's version of egcs for Darwin has Altivec support (from Motorola, actually), and it's been available for while. They're in the process of assigning copyright of 60,000+ lines of gcc patches to the FSF, so it should become part of the main tree at some point.

  19. Re:So when can I buy... by Darchmare · · Score: 3

    ---
    a G4 system without the OS forcibly "bundled"?
    ---

    Probably around the time you can buy any VCR and have your choice of software bundled.

    It's Apple's hardware, and it's Apple's software. It's not like they're pulling a Microsoft here and forcing other companies to not bundle alternative operating systems - they _are_ the other company. Anyone out there is free to build their own PPC based machines with LinuxPPC preinstalled. It's not their fault that nobody has done so.


    - Jeff A. Campbell
    - VelociNews (http://www.velocinews.com)

    --

    - Jeff
  20. Woohoo! by john_boy · · Score: 3

    Altivec support has been in all of the 2.3.x kernels, but it hasn't done much yet -- only #ifdef'ed in a handful of lines of code. This is really quite cool; I'm already running Linux on a PowerPC 750 (the G3). My next machine will likely be a G4 or whatever's next.

    There's a good bit of info on the alti-vec and the G4 in this Ars Technica article (that was slashdotted a while back).

    John

  21. Woohoo! by Chris+Johnson · · Score: 5
    Sweet :) and I for one am not surprised. 'Altivec' aka 'Velocity Engine' is a bunch of _general_ _purpose_ big-ass registers which are not shared with FP registers or hobbled unreasonably. PPC is already incredibly register-rich (what is it, 32 int and 32 FP and now 32 128-bit altivec registers? That can work like 192 32-bit registers (yes you can treat them like divided address spaces- multiple values) versus Intel which gets what, 8? 16? 32? and shares its vector processing with FP registers.

    Please, if anyone can flame my data and correct it I beg of you to do so ;) but I'm not a bit surprised that G4s are doing this. Altivec lends itself to big data operations, not just vector processing. Memory moves are faster 128 bits at a time, and so on. Screen blitting, likewise. I wouldn't be a bit surprised if someone is working on an optimized X that uses G4 altivec acceleration- that would seem to be a no-brainer.

  22. links to the patches by rillian · · Score: 5

    I had a lot of trouble trying to actually find this code. It may be in the yellowdog cvs but the server seems to be down, as is the ftp server.

    They do say to go to altivec.org to download the gcc and binutils. It's in the tools section behind a "you must sign up for our email forum" form. The packages there include a new binutils, gcc, gdb, and libc to support the altivec extensions.

    Here are the direct links, for the curious: