[Cbe-oss-dev] [PATCH 02/02][RFC] spufs: try to work without master run bit
Jeremy Kerr
jk at ozlabs.org
Mon Feb 5 21:34:27 EST 2007
Masato-san,
> I want to fix it witout using master run bit, if possible.
> Does anyone have comments?
Yes, Arnd and I were talking about this issue last week.
We have an invariant in the kernel code that a SPE is only allowed to
run when the PPE process is in the spu_run() syscall. When there is no
master run control available, it is possible (by altering the run
control register through userspace-mapped problem state) to have a SPE
running when it's PPE process is not in spu_run(). This is bad.
So, our intended approach is to deassert the runcontrol bit when spu_run
returns, and then unmap (or map read-only) the necessary pages of the
problem state mapping.
However, someone still needs to do this - it's on my todo list, but if
you feel like coding something up beforehand, be my guest :)
> BTW, in current implementation, if spe was running at disabled
> by master run, it seems to be failed at next spu_run syscall.
> Is it correct?
That's correct. In order to run a SPE, the run control bit needs to be
set after the master run control bit is set. So, to start a SPE, we
need to set the master run control bit, *then* set the problem-state
run control bit (even if it's already 1).
Regards,
Jeremy
More information about the cbe-oss-dev
mailing list