Dear Morten,
Sorry for the delayed response. I have submitted your inquiry to the the
appropriate people at IBM and received the following reply:
--------------
The libspe (version 1.2) was based upon a prototype runtime that was
created by the small SW team for the expressed purposes of Cell processor
bringup. With this implementation, we all realized that it had some very
fundamental limitations that we want to address as we bring full
production libraries forward. This is the reason libspe (version 2, also
known as libspe2), exists. The intent is that libspe1.2 will be deprecated
and that all future development should use libspe2. The version of
libspe2 released in SDK 2.0 was early prototype code and did not go
through our formal testing procedures. The next release of the SDK is
planned to fully and exclusively use libspe2. This means that all code
samples will be ported to libspe2. A migration guide is also planned with
this release to assist developers in the migration of libspe 1.x code to
libspe2. The libspe 1.x libraries should continue to be available, but
their use is not encouraged.
Your example of 30 contexts, 30 program loads, and 30 runs will work
depending upon the scheduling attributes of the threads. SDK 2.0 only
supports a run-to-completion scheduling policy. Therefore, the run
request will block until a SPE is available. Future SDKs are expected to
support standard linux scheduling polices like round robin (SCHED_RR) so
that SPE threads are pre-empted.
Note: Don't forget, in your example, you must also create 30 thread
(pthreads) of execution. Otherwise, the first spe_context_run will block
until the SPE completes.
I hope this helps.
Sincerely,
Dan B.
-------------------------------------------------------------------------------
Daniel A. Brokenshire
STSM / Emerging Products Development
brokensh@us.ibm.com 512-838-3373
--------------------------------------
Your orignial inquiry is shown at the bottom of this email. If you have
any further questions please feel free to reply to this note.
==========================
Gary Beckwith
IBM Customer Connect
beckwith@us.ibm.com
(802) 769-6312, t/l 446-6312
home office (802) 434-4939
Satisfaction?
Importance?
Comments
OVERALL
N/A
I have a comment regarding libspe. You dont make it clear anywhere in the
documentation for libspe2.0 why you found it necessary to provide two
concurrently existing APIs for spe development (libspe1.2 being the
other). Id very much like for you to clearify this.
Also I dont feel its clear what happens if more calls are made to
spe_program_load() then the system has SPUs. For instance when using
ps3linux there are physically 6 available to the developer. What happens
if first spe_program_load was called 30 times for 30 diff contexts then
next spe_contex_run() is called 30 times. Would this work? Would it
postspone the actual load into local storage when the run is performed? If
so do loads get cached if the program is already available on an spu? If
not and it actually does get loaded into local storage in the load call
then what happens after 6 loads? Will it block all subsequent loads until
a run is called? Or will it simply return error codes? I felt these things
were not clear from the documentation.