[Cbe-oss-dev] [RFC] spufs: use master control bit in spu_run

Jeremy Kerr jk at ozlabs.org
Tue Nov 7 16:25:09 EST 2006


> The code may get even simpler if we move the initial isolated
> load into the spu_run instead of doing it behind the back
> of spu_create.

The justification for doing the isolated setup in spu_create is that it 
allows us to block in the kernel while the loader is starting. Then, by 
the time spu_create has returned, it's ready to accept the adddress of 
the isolated app, in order to load it and get it running.

If we start the loader from spu_run, we'll need to do the following:

thread 1: spe_create()
thread 2:				spe_run()
					 (kernel starts loader)
thread 1: wait for loader to start
           (spin on SPE status)
thread 1: send app address to loader
thread 2:				loader loads & runs app

If this is OK, I'll be happy to do the necessary changes.

Otherwise, provided that the SPE state-transition mechanism allows us to 
do it (eg, we need to make sure we don't recycle while returning from a 
syscall), this looks good. I like the idea of not having the spufs 
recycle file.

I am still yet to test it though, I need to make some alterations to 
libspe to run my isolated-mode tests. I'll let you know how they go.

Regards,


Jeremy



More information about the cbe-oss-dev mailing list