[Cbe-oss-dev] [RFC/PATCH] libspe2: use mapped mailbox registers to speed up mailbox communication

Arnd Bergmann arnd at arndb.de
Fri May 18 22:50:39 EST 2007


On Friday 18 May 2007, Kazunori Asayama wrote:
> Such lock around the "write" may cause blocking in spe_in_mbox_write()
> with SPE_MBOX_ANY_NONBLOCKING in other threads...

Right, I forgot about that.

> I propose:
> 
>   - always to use _base_spe_in_mbox_write_ps() to write to mbox, if PS
>     map is enabled, and,
> 
>   - to wait for the mbox by poll(), if mbox is full.
> 
> What do you think ?

yes, that sounds good. Note that strict nonblocking semantics cannot
be done with direct access, as the reading will always block when the
SPU context is not running, but at using poll() at least makes it
consistant, meaning that we also don't use the fast-path access to
a saved context but always block in the same way when it's not
running.

	Arnd <><



More information about the cbe-oss-dev mailing list