[Cbe-oss-dev] [PATCH 1/5] MARS: yield in workload queue wait busy loop

Kazunori Asayama asayama at sm.sony.co.jp
Wed Jul 16 12:37:18 EST 2008


Arnd Bergmann wrote:
> What you describe is one of the features of futexes: When you use them
> with atomic updates (load-locked/store-conditional), you only need to
> do a system call if there are other threads that are waiting or that
> you need to wait for.

If I understand correctly, it seems to be impossible that an SPE wakes
a PPE thread up by using futex unless the SPE stops in order to do SPU
syscall...

> 
> Another option would be to use the mailboxes for asynchronous communication
> from the SPU to the PPU. In the fast path, you can normally use simple
> memory accesses, but if you think the other PPU might be blocking, the SPU
> has to write to the interrupt mailbox, so that the PPU can do a blocking
> read on it.

I worry that the probability of the SPE's stall may significantly 
increases because of use of mailboxes. We'll need to look into various 
possible scenarios and to evaluate performance impact if we try to use 
the mailboxes for this purpose. And we also need to consider about 
MARS's task switches since the MARS doesn't take care of MFC's status 
when switching tasks (yes, MARS's task switching is 'light weight'!); 
that is, if a task A writes anything to the SPE's mailbox then MARS 
switches the task A to another task B, the content of the mailbox still 
exists until some PPE thread reads it. That means one task can cause 
another task's stall even if they logically have no dependency.

-- 
(ASAYAMA Kazunori
   (asayama at sm.sony.co.jp))
t



More information about the cbe-oss-dev mailing list