[Cbe-oss-dev] [PATCH] libspe2: setup intial registers with trampoline, rather than the regs file

Arnd Bergmann arnd at arndb.de
Wed Aug 13 22:01:09 EST 2008


On Wednesday 13 August 2008, Jeremy Kerr wrote:
>  * accessing the regs file requires the context to be de-scheduled.
>    Although contexts currently start in the saved state, this isn't
>    a defined bahaviour of spufs, so setting up the regs file in this
>    manner may cause a performance penalty with future kernels. This
>    will also be the case when already-loaded contexts are being
>    re-used with a new program.

Actually, it's worse that that: with the braindead definition
of spe_context_run, every time you pass SPE_DEFAULT_ENTRY into
the context, it will have to reload the argument registers, so
it's not just reusing the context but also the simple case
of calling the same function multiple times that is utterly
broken (at least performance-wise) without this patch.

	Arnd <><



More information about the cbe-oss-dev mailing list