[Cbe-oss-dev] [PATCH 2/2] [POWERPC] spufs: fix rescheduling of non-runnable contexts
Christoph Hellwig
hch at lst.de
Tue Mar 11 18:24:58 EST 2008
On Tue, Mar 11, 2008 at 05:16:59PM +1100, Jeremy Kerr wrote:
> At present, we can hit the BUG_ON in __spu_update_sched_info by reading
> the regs file of a context between two calls to spu_run. The
> spu_release_saved called by spufs_regs_read() is resulting in the (now
> non-runnable) context being placed back on the run queue, so the next
> call to spu_run ends up in the bug condition.
>
> This change uses the SPU_SCHED_SPU_RUN flag to only reschedule a context
> if it's still in spu_run().
Yes, I had a similar patch using mutex_is_locked on the run_mutex
which made the kernel crash go away. We should probably add an assert
to spu_activate that SPU_SCHED_SPU_RUN is set to catch other such
possibilities.
More information about the cbe-oss-dev
mailing list