[Cbe-oss-dev] spu question

Arnd Bergmann arnd.bergmann at de.ibm.com
Tue Oct 10 21:31:11 EST 2006


On Monday 09 October 2006 22:44, Luke Browning wrote:
> How can we determine the number of installed spus to limit the size of the 
> gang?   Should we just add a new check to spu_create(thread) that fails 
> when the number of spes threads in the gang is greater than the number of 
> installed spus.

(cc: ing the mailing list, maybe someone has better ideas)

I guess we could fail both the creating of threads in a gang
and the creation of nonschedulable contexts if there is not
enough space.

That means we have to add housekeeping to the kernel for the
number of non-pinned SPUs that is available, as well as recording
the number of pinned SPUs in order to determine the maximum size
of a gang.

The simpler alternative would be that we simply allow the users to
specify impossible situations, e.g. pinning more than the physically
available SPUs or creating a gang that is larger than that number.

As a result, the spu_run() call could simply block interruptibly,
until either the user kills the task or the condition becomes possible
when something else exits.

I'd prefer the simpler solution, but it's a tradeoff, because users
don't notice early. We should definitely not allow creating more
threads in a gang than what is physically possible, but that only
depends on the number of SPE nodes in the device tree and is easy
to determine.

On a hypervisor system that does not have a fixed number of SPUs
assigned to a partition, we may need to have some way to communicate
the maximum number of SPUs to Linux through some hcall or device tree
entry.

	Arnd <>



More information about the cbe-oss-dev mailing list