Re: [PATCH] sched/rt: fix SCHED_RR across cgroups

From: Colin Cross
Date: Fri May 18 2012 - 20:14:08 EST


On Fri, May 18, 2012 at 11:37 AM, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:
> On Fri, 2012-05-18 at 10:52 -0700, Colin Cross wrote:
>
>> > OK, fair enough.. one does wonder though, WTH is android doing with
>> > SCHED_RR?
>>
>> Nothing, I was just experimenting with how it interacted with cgroups
>> and the numbers didn't make sense.
>
> OK. Thanks anyway!

Even with this patch, scheduling of SCHED_RR tasks in cgroups is a
little odd. Each cgroup is treated as a schedulable entity alongside
the tasks in the same parent cgroup, and then the tasks inside the
child cgroup round robin through the child cgroup's time slices. So
in the setup:
root_cgroup
task 1
cgroup
task 2
task 3

The RR will be:
task 1, cgroup(task 2), task 1, cgroup(task 3), ...

task 1 will run twice as often, for a full RR_TIMESLICE each time, as
tasks 2 and 3.

Is that the way SCHED_RR is intended to interact with cgroups?
--
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/