[Cbe-oss-dev] Call/return from PPE to SPE functions

Julio M. Merino Vidal jmerino at ac.upc.edu
Wed May 30 17:04:54 EST 2007


On 30/05/2007, at 0:21, Arnd Bergmann wrote:

> On Tuesday 29 May 2007, Julio M. Merino Vidal wrote:
>>> 1. saved and idle
>>> 2. saved and trying to run
>>> 3. loaded and running
>>> 4. loaded and idle
>>
>> Not exactly related to this, but I want to make sure I understood the
>> code correctly.  Suppose a context A in state 4.  Then you put B1..BN
>> contexts (where N = number of available SPUs) in state 3.  In that
>> case, context A goes to state 1
>
> right
>
>> until it can be rescheduled again
>> (e.g. one of the Bi contexts terminates), at which point it is put in
>> state 2 and later in state 3.  Right?
>
> not exactly. A remains in state 1, until it tries to run again. At  
> that
> point, it either goes into state 2 or 3, depending on whether there  
> are
> any free (no context loaded) or idle (with a context in state 4)  
> SPUs at
> that time.
>
> It also depends on whether any of the threads use real-time  
> priorities,
> meaning that they will immediately suspend another context in order
> to run, if their priority is high enough.

Ah, true, forgot about that.

A while ago I made a simple diagram that outlines how the scheduler  
works.  I'm attaching it.  Maybe anybody could confirm if it is  
correct? :-)  I'm sure it misses something, but I hope the overall  
structure is correct.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: img-spu-scheduler.png
Type: image/png
Size: 58335 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/cbe-oss-dev/attachments/20070530/7457ef01/attachment.png>
-------------- next part --------------

-- 
Julio M. Merino Vidal <jmerino at ac.upc.edu>




More information about the cbe-oss-dev mailing list