[Cbe-oss-dev] [PATCH, RFC] streamline locking for isolated spu setup
Arnd Bergmann
arnd at arndb.de
Sat Mar 17 10:34:16 EST 2007
On Friday 16 March 2007, Christoph Hellwig wrote:
> For quite a while now spu state is protected by a simple mutex instead
> of the old rw_semaphore, and this means we can simplify the locking
> around spu_setup_isolated a lot.
>
> Instead of doing an spu_release before entering spu_setup_isolated and
> then calling the complicated spu_acquire_exclusive we can now simply
> enter the function locked an in guaranteed runnable state, so that the
> only bit of spu_acquire_exclusive that's left is the call to
> spu_unmap_mappings.
>
> Similarly there's no more need to unlock and reacquire the state_mutex
> when spu_setup_isolated is done, but we can always return with the
> lock held and only drop it in spu_run_init in the failure case.
Ah, very nice. I guess we can eventually pull the spu_setup_isolated()
call into spu_activate() and then finally kill spu_acquire_runnable?
Arnd <><
More information about the cbe-oss-dev
mailing list