Re: [RFC -v3 PATCH 2/3] sched: add yield_to function

From: Mike Galbraith
Date: Tue Jan 04 2011 - 13:53:50 EST


On Tue, 2011-01-04 at 19:04 +0100, Peter Zijlstra wrote:

> > + p_cfs_rq = cfs_rq_of(pse);
> > + yield = 1;
> > + }
> > +#endif
> > +
> > + if (yield)
> > + clear_buddies(cfs_rq, se);
> > + else if (preempt)
> > + clear_buddies(p_cfs_rq, curr);
> > +
> > + /* Tell the scheduler that we'd really like pse to run next. */
> > + p_cfs_rq->next = pse;
> > +
> > + if (!yield && preempt)
> > + resched_task(task_of(p_cfs_rq->curr));
>
> I don't get this.. Why would you resched the remote cpu, surely you
> didn't just pull its current task over..

:) hope not. Caller bails on task_running(p_rq, p). wants a comment
too I suppose.

Target doesn't live here, preempt is still set/allowed, so we want the
remote cpu to schedule.

-Mike

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/