Re: [RFC PATCH v5 20/29] sched/deadline: Allow deeper hierarchies of RT cgroups

From: luca abeni

Date: Thu May 14 2026 - 03:26:00 EST


Hi Tejun,

On Tue, 12 May 2026 08:19:02 -1000
Tejun Heo <tj@xxxxxxxxxx> wrote:

> Hello,
>
> How is a delegated subtree prevented from setting cpu.rt.min = 'root'
> and escaping its ancestors' cpu.rt.max budget?

If I understand well (please correct me :), the following strategy
should address this concern (and the ones expressed in successive
emails):
- cpu.rt.max can be "runtime, period" (or "runtime, period, deadline")
or "root". "root" gives the current behaviour when RT cgroup
scheduling is not enabled (so, no need to disable it at build time :)
- if cpu.rt.max is "root", the cgroup's FIFO/RR tasks are scheduled in
the root cgroup
- if cpu.rt.max is "root", the children cgroups can only have "root"
in cpu.rt.max
- if cpu.rt.max is not "root", then cpu.rt.min (or cpu.rt.internal)
is "runtime, period" and describes the dl server for this cgroup's
FIFO/RR tasks.
- The default value for cpu.rt.min is copied from cpu.rt.max, so as a
default all the CPU utilization of the cgroup is dedicated it its RT
tasks
- the admission test is: cpu.rt.min utilization plus the sum of the
children's cpu.rt.max utilizations must be <= cpu.rt.max utilization;
children can have cpu.rt.max="root" only if cpu.rt.max="root"

Can this work? I think it avoids escaping the parents' cpu.rt.max,
allows for a reasonable default (no-one should be forced to disable this
feature), and should respect all the requirements... Or am I missing
something?



Thanks,
Luca