New CELL Article Online

Article: CELL Microprocessor III
By: Linus Torvalds (, August 5, 2005 6:21 pm
Room: Moderated Discussions
Deadmeat ( on 8/5/05 wrote:
>The CPU thread is put to sleep after it kicks the APU.


Or rather, it's entirely possible that this is one model
(perhaps even the one that whatever SDK's are out there
now use), but it's certainly not something fundamental.

At the 2005 Kernel Summit, there was an IBM presentation
on Cell (and a BOF later on going into some more details),
and it appears that people are actually doing exactly the
right thing, at least with Linux interfaces.

Some very early stuff used the SPU as a "device driver",
and you did work on the SPU by doing ioctl's on it, and
that sounds a bit like the schenario you describe: the
initiator would typically block for the SPU to be ready.

However, at least inside IBM they are working on (and
apparently using) a model where you can basically run
threads on the SPU, and you have a mixed thread model. So
you can have two main threads running concurrently on
the SMT PPE, and seven threads running on the SPE's, all
at the same time, with nobody really "blocking".

Now, I actually thought the Cell would be a major pain to
program for, but thinking about it, I can actually see it
not being too nasty. I hope IBM (or even Sony!) really
makes Cell machines widely available, because that will
definitely help the kernel do a better job, but basically
there is nothing fundamentally wrong with having Linux
threads that can freely switch back and forth between the
PPE and a SPE.

In fact, from a programming interface isn't really not at
all different from any Linux x86 machine with vm86 mode:
the thread can be in "32-bit mode" or "vm86 mode", and a
system call moves it into vm86 mode, and then any exception
(page fault, signal, you name it) turns it back into a
32-bit mode process.

Now, on a PC, the vm86 mode code actually runs on the same
core, but that's just an implementation detail, it's not
really conceptually something the kernel cares about.

On x86, you use a magic "iret" instruction to turn the CPU
into a vm86 core, and on Cell you'd use "SPE resource
scheduler" to turn a native-mode process into a SPE process,
so it would certainly look very different in the details
(and you could run seven SPE's at a time), but from a high
level standpoint both cases really just have a system call
to go into a new mode.

Together with a few helper libraries, I bet you can program
the beast without even really having to care too much about
the SPE's. Sure, it will probably take a while before the
infrastructure is in place, and early SDK's will be pretty
painful, but hey, game programmers should be taking that
for granted by now.

Especially if Sony makes Linux on PS3 available enough that
you actually find people getting into it, I bet there are
lots of people who would actually get into trying to make
it pretty nice to use.

Now, saying "Sony" and "open" in the same sentence may be
a bit optimistic, so we'll see. I don't really see IBM
making Cell's widely available without Sony (the same way
Apple was the one spreading the ppc970 gospel), so while
IBM may well sell Cell blades etc, I think this depends to
some degree on Sony really being willing to make the PS3
an open enough platform for the infrastructure to grow up
around it.

< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
New CELL Article OnlineDavid Kanter2005/08/02 11:32 AM
  New CELL Article Onlinemas2005/08/02 12:46 PM
    New CELL Article Onlinemas2005/08/02 12:53 PM
    New CELL Article OnlineDavid Wang2005/08/02 01:46 PM
      New CELL Article Onlinefastpathguru2005/08/02 04:05 PM
        New CELL Article OnlineDavid Wang2005/08/02 06:27 PM
          New CELL Article OnlinePanajev2001a2005/08/03 03:26 AM
            New CELL Article OnlineDavid Wang2005/08/03 11:28 AM
              New CELL Article OnlineDeadmeat2005/08/04 01:05 PM
                New CELL Article OnlineDavid Wang2005/08/04 05:47 PM
                  New CELL Article OnlineDeadmeat2005/08/04 07:04 PM
                    New CELL Article Onlinejohn evans2005/08/04 08:30 PM
                      New CELL Article OnlineDeadmeat2005/08/05 12:10 PM
                        New CELL Article OnlineLinus Torvalds2005/08/05 06:21 PM
                          New CELL Article OnlineDeadmeat2005/08/05 07:33 PM
                            New CELL Article Onlinefastpathguru2005/08/05 10:36 PM
                              New CELL Article Onlinejohn evans2005/08/05 10:51 PM
                              New CELL Article OnlineDeadmeat2005/08/06 04:09 AM
                                New CELL Article Onlinefastpathguru2005/08/06 06:29 AM
                                  New CELL Article OnlineDeadmeat2005/08/07 04:06 PM
                    New CELL Article OnlineDavid Wang2005/08/04 09:03 PM
                      New CELL Article OnlineDeadmeat2005/08/05 12:21 PM
                        New CELL Article OnlineDavid Wang2005/08/05 11:51 PM
              New CELL Article OnlineDavid Wang2005/08/06 12:00 AM
                New CELL Article OnlineDeadmeat2005/08/07 03:39 PM
                  New CELL Article OnlineDavid Wang2005/08/08 01:57 PM
                    New CELL Article OnlineDeadmeat2005/08/08 02:55 PM
                      New CELL Article OnlineDavid Wang2005/08/08 03:37 PM
                        New CELL Article OnlineDeadmeat2005/08/08 05:05 PM
                          New CELL Article OnlineDavid Wang2005/08/08 05:47 PM
                            New CELL Article OnlineDeadmeat2005/08/08 06:25 PM
                              Implausible at best, irrational most likely...David Kanter2005/08/08 06:51 PM
                                Implausible at best, irrational most likely...Deadmeat2005/08/09 10:26 AM
                              New CELL Article OnlineDavid Wang2005/08/08 07:46 PM
                                New CELL Article OnlineDeadmeat2005/08/09 10:36 AM
                                  New CELL Article OnlineDavid Wang2005/08/09 11:12 AM
                                    New CELL Article OnlineDeadmeat2005/08/09 01:26 PM
                                      New CELL Article OnlineDavid Wang2005/08/09 02:36 PM
                                New CELL Article OnlineAaron Spink2005/08/09 02:57 PM
                                  New CELL Article OnlineDavid Wang2005/08/10 10:06 AM
                    New CELL Article OnlineSerge Monkewitz2005/08/09 01:18 PM
                      New CELL Article OnlineDeadmeat2005/08/09 01:30 PM
                        New CELL Article OnlineVitaly Vidmirov2005/08/11 01:36 AM
      New CELL Article OnlineAnonymous2005/08/03 04:11 PM
        New CELL Article Onlinefastpathguru2005/08/03 05:19 PM
          New CELL Article Onlinemas2005/08/03 07:59 PM
            New CELL Article OnlineJosé Javier Zarate2005/08/04 05:20 AM
              New CELL Article Onlinemas2005/08/04 05:27 AM
          New CELL Article Onlinemas2005/08/05 06:50 AM
  New CELL Article OnlinePiedPiper2005/08/02 09:02 PM
Reply to this Topic
Body: No Text
How do you spell avocado?