[Cbe-oss-dev] [PATCH] powerpc/spufs: fix race for a free SPU

Jeremy Kerr jk at ozlabs.org
Fri Sep 5 09:21:48 EST 2008


Hi Christoph,

> Maybe this should be come:
>
> 	new = grab_runnable_context(max_prio, spu->node);
> 	if (new) {
> 		spu_unschedule(spu, ctx, 0);
> 		if (new->flags & SPU_CREATE_NOSCHED)
> 			wake_up(&new->stop_wq);
> 		else {
> 			spu_release(ctx);
> 			spu_schedule(spu, new);
> 			mutex_lock(&ctx->state_mutex);
> 		}
> 	} else if (force) {
> 		/* spu is actually unused now */
> 		spu_unschedule(spu, ctx, 1);
> 	}

Yep, was thinking about doing this rework; I'll leave that to a separate 
patch though, so that the actual fix is as small as possible.

Cheers,


Jeremy



More information about the cbe-oss-dev mailing list