[Cbe-oss-dev] Sanity check with using spu_stop
Philip Pratt-Szeliga
phil.pratt.szeliga at gmail.com
Sat Sep 12 07:28:30 EST 2009
Hello,
I am the original poster of this problem on the IBM website:
http://lists.ozlabs.org/pipermail/cbe-oss-dev/2008-June/004864.html
I had an example where I ran spu_stop in a tight loop and I had events
enabled on my context. This would cause a pipe to fill
up, (I think). A fix is to disable events on a context.
I am back to using spu_stop again on another project and I re-read the
mailing list. This time I want to have callbacks
enabled for some things and use spu_stop for other things. I have
gathered that if I do something like the following it should work:
do {
retval = spe_context_run(context_info->context,
&(context_info->entry_point), 0, &transfer_work_item_info, NULL,
&stopinfo);
/* consume the stop info so we don't get the spu_stop in loop problem */
spe_stop_info_read(context_info->context, &stopinfo);
if(retval == 0x10) /* spu_stop(0x10) is sent from the spe when the
loop is done */
break;
} while (retval > 0); /* Run until exit or error */
I made a small example that works, but when I integrate into my large
example I get retvals other that 0x10. I only send spu_stop(0x10)
from the SPU (I am _very_ sure) and I have a main in the SPU that has
a while(true) and never returns.
Does anyone know how I could get retvals to be: 0, 2753 or 2817?
I have looked through the spufs kernel code and the libspe2 code and I
have ensured that the 0 is not a successful exit but actually an
spu stop and signal. (Later I found that this could be checked with stopinfo).
If there is something wrong with the internals and I can figure out
what it is, I am ready to make a patch. I have the programming
skills to do so and the funding and time. (I am a phd student and the
future direction of my research depends on getting this to work).
Thanks for any help
Phil Pratt-Szeliga
Syracuse University, USA
More information about the cbe-oss-dev
mailing list