Cgroupsv2 and real-time processes

240 Views Asked by At

So the cgroupv2 documentation states the following when it comes to the CPU controller:

The "cpu" controllers regulates distribution of CPU cycles. This
controller implements weight and absolute bandwidth limit models for
normal scheduling policy and absolute bandwidth allocation model for
realtime scheduling policy.

WARNING: cgroup2 doesn't yet support control of realtime processes and
the cpu controller can only be enabled when all RT processes are in
the root cgroup. Be aware that system management software may already
have placed RT processes into nonroot cgroups during the system boot
process, and these processes may need to be moved to the root cgroup
before the cpu controller can be enabled.

I did the following experiment: Created 3 cgroups under the root-cgroup and enabled the cpu controller for each of them. All cgroups are configured with only one cpu in their cpuset.

I assigned weight 200 to cgroup A and weight 100 to cgroups B and C. I placed SCHED_NORMAL tasks (that run a simple while true loop) into these cgroups and top shows 50%, 25% and 25% cpu utilization as expected.

I started a real-time processes scheduled with SCHED_DEAD allowed to use 66% cpu utilization and placed it in cgroup B.

What I have seen is that the RT processes still gets 66% cpu while the remainin 33% is divided in 50%, 25% and 25% which is as expected .. or?

What I don't understand is why the documentation is says cgroup2 doesn't yet support control of realtime processes and the cpu controller can only be enabled when all RT processes are in the root cgroup.

as explained in the question

0

There are 0 best solutions below