[Cbe-oss-dev] [PATCH 6/6] spufs: remove run mutex

Christoph Hellwig hch at lst.de
Thu Feb 7 17:09:54 EST 2008


On Wed, Feb 06, 2008 at 03:43:44PM -0200, Luke Browning wrote:
> Remove context specific run_mutex.  It does not protect any context specific
> state.  It is used to ensure that the spu_run system call is not invoked 
> multiple times for the same context by two or more threads concurrently.  
> The ctx->tid field can be used for the same purpose without having to 
> add extra unnecessary locking.

>From a quick look over it this is fine.  The changelog should document
that we're moving the spu_enable_spu/spu_disable_spu calls, though.

Two little style issues below:


> -	__spu_update_sched_info(ctx);
> +	(void) __spu_update_sched_info(ctx);

We generally don't do this (void) case in Linux.

>  	spu_set_timeslice(ctx);
>  	ctx->stats.util_state = SPU_UTIL_IDLE_LOADED;
>  
> Index: spufs/arch/powerpc/platforms/cell/spufs/run.c
> ===================================================================
> --- spufs.orig/arch/powerpc/platforms/cell/spufs/run.c	2008-02-06 12:51:26.000000000 -0200
> +++ spufs/arch/powerpc/platforms/cell/spufs/run.c	2008-02-06 13:18:51.000000000 -0200
> @@ -162,6 +162,7 @@
>  	unsigned long runcntl = SPU_RUNCNTL_RUNNABLE;
>  	int ret;
>  
> +        spu_enable_spu(ctx);

this should be a tab instead of spaces.




More information about the cbe-oss-dev mailing list