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

From: Hillf Danton
Date: Tue Jan 04 2011 - 12:02:15 EST


On Wed, Jan 5, 2011 at 12:54 AM, Rik van Riel <riel@xxxxxxxxxx> wrote:
> On 01/04/2011 11:51 AM, Hillf Danton wrote:
>
>>> 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?
>
> If the user chooses to overcommit the CPU with realtime
> tasks, the user cannot expect realtime response.
>
> For realtime, I have not implemented the yield_to callback
> at all because it would probably break realtime semantics
> and I assume people will not overcommit the CPU with realtime
> tasks anyway.
>
> I could see running a few realtime guests on a system, with
> the number of realtime VCPUs not exceeding the number of
> physical CPUs.
>
Then it looks curr->sched_class != p->sched_class is not enough,
and yield_to can not ease the lock contention in KVM in case where
p->rq->curr is RT.
--
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/