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

From: Hillf Danton
Date: Tue Jan 04 2011 - 11:51:58 EST


On Wed, Jan 5, 2011 at 12:44 AM, Rik van Riel <riel@xxxxxxxxxx> wrote:
> On 01/04/2011 11:41 AM, Hillf Danton wrote:
>
>> /* Â Â Â Â Â Â Â Â Â Â Â !curr->sched_class->yield_to_task || Â Â Â Â*/
>>
>>> + Â Â Â Â Â Â Â Â Â Â Â curr->sched_class != p->sched_class) {
>>> + Â Â Â Â Â Â Â goto out;
>>> + Â Â Â }
>>> +
>>
>> Â Â Â Â/*
>> Â Â Â Â Â* ask scheduler to compute the next for successfully kicking
>> @p onto its CPU
>> Â Â Â Â Â* what if p_rq is rt_class to do?
>> Â Â Â Â Â*/
>> Â Â Â Ânext = pick_next_task(p_rq);
>> Â Â Â Âif (next != p)
>> Â Â Â Â Â Â Â Âp->se.vruntime = next->se.vruntime -1;
>> Â Â Â Âdeactivate_task(p_rq, p, 0);
>> Â Â Â Âactivate_task(p_rq, p, 0);
>> Â Â Â Âif (rq == p_rq)
>> Â Â Â Â Â Â Â Âschedule();
>> Â Â Â Âelse
>> Â Â Â Â Â Â Â Âresched_task(p_rq->curr);
>> Â Â Â Âyield = 0;
>
> Wouldn't that break for FIFO and RR tasks?
>
> There's a reason all the scheduler folks wanted a
> per-class yield_to_task function :)
>

Where is the yield_to callback in the patch for RT schedule class?
If @p is RT, what could you do?

Hillf
èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—