[Cbe-oss-dev] [PATCH] [POWERPC] spufs: fix scheduler starvation by idle contexts
Arnd Bergmann
arnd at arndb.de
Mon Mar 3 16:12:27 EST 2008
On Monday 03 March 2008, Christoph Hellwig wrote:
>
> > This change replaces the spu_stopped() check with checking for SCHED_IDLE
> > in ctx->policy. We set a context's policy to SCHED_IDLE when we're not
> > in spu_run(). We also favour SCHED_IDLE contexts when looking for contexts
> > to unbind, but leave their timeslice intact for later resumption.
>
> I'm okay with the algorithm, but please don't use policy == SCHED_IDLE
> as the flag for it. SCHED_IDLE is a user-visible and user-settable
> scheduler class and we shouldn't overload this.
Ah, didn't know that. Is that a fairly recent interface in Linux? I can't
find any reference to it in the sched_setscheduler man page, though the
mail archives have numerous discussions about the semantics throughout
the last 10 years.
> Just use a flag in the context instead.
Yes, that makes sense.
Arnd <><
More information about the cbe-oss-dev
mailing list