[Cbe-oss-dev] [PATCH 2/2] [POWERPC] spufs: fix invalid scheduling of forgotten contexts
Jeremy Kerr
jk at ozlabs.org
Thu Mar 6 10:00:18 EST 2008
Hi Luke,
> If it could be lazily loaded, it can be on the runqueue as described
> above. Therefore, it is not a bug for the context to be on the
> runqueue at the time spu_forget() is called.
Yep, we've since removed this possiblity with the (initial) SCHED_IDLE
change.
But I think I see where you're coming from here.
A context that is not in spu_run but in the run queue has been (by
definition) a bug - this was due to our previous scheduler's
requirement that only running contexts are loaded, which you've since
improved with your asynchronous scheduler implementation. We still make
assumptions based on this invariant (eg, the BUG_ON() in
spu_update_sched_info()).
So, it's possible that we can now remove this assumption, but we need to
do some careful checking of the code first, and remove the recent
additions which check that a context is within spu_run before adding it
to the run queue.
The down-side to this is that non-running contexts will still use up
scheduler timeslices for no good reason, as they may be re-loaded by
spusched_tick, excluding a context that has actual work to do.
Cheers,
Jeremy
More information about the cbe-oss-dev
mailing list