Re: [PATCH] sched/core: Fix cpu controller for !RT_GROUP_SCHED

From: Michal Koutný
Date: Wed Jun 05 2019 - 10:24:09 EST


On Wed, Jun 05, 2019 at 01:49:35PM +0200, Juri Lelli <juri.lelli@xxxxxxxxxx> wrote:
> Existing code comes with a comment saying the "we don't support RT-tasks
> being in separate groups".
I'm also inclined to this check not being completely correct.

This guard also prevents enabling cpu controller on unified hierarchy
with !CONFIG_RT_GROUP_SCHED. (If there are any kernel RT threads in root
cgroup, they can't be migrated to the newly create cpu controller's root
in cgroup_update_dfl_csses().)

I considered relaxing the check to non-root cgroups only, however, as
your example shows, it doesn't prevent reaching the avoided state by
other paths. I'm not that familiar with RT sched to tell whether
RT-priority tasks in different task_groups break any assumptions.

Michal