[Cbe-oss-dev] [PATCH 3/3] spu sched: forced preemption at execution

Christoph Hellwig hch at lst.de
Tue Feb 27 22:37:28 EST 2007


On Thu, Feb 22, 2007 at 10:11:38PM -0300, Luke Browning wrote:
> > +      list_for_each_entry(spu, &spu_prio->active_list[node], list) {
> > +         struct spu_context *tmp = spu->ctx;
> > +
> > +         if (tmp->rt_priority < ctx->rt_priority &&
> > +             (!victim || tmp->rt_priority < victim->rt_priority))
> > +            victim = spu->ctx;
> > +      }
> 
> 
> You really want to preempt sched_other jobs before fixed priority jobs.
> Does the
> above consider sched_other jobs.   what is the relationship between prio
> and rt_priority?

rt_priotiry is the value we set through sched_setscheduler(2).  It's
always 0 for SCHED_NORMAL tasks.  The normal_prio for rt tasks is
calculated as:

	MAX_RT_PRIO-1 - p->rt_priority;




More information about the cbe-oss-dev mailing list