Messages in this thread | | | Date | Fri, 18 May 2012 17:13:28 -0700 | Subject | Re: [PATCH] sched/rt: fix SCHED_RR across cgroups | From | Colin Cross <> |
| |
On Fri, May 18, 2012 at 11:37 AM, Peter Zijlstra <a.p.zijlstra@chello.nl> 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?
| |