Re: [RFC PATCH v5 19/29] sched/rt: Remove support for cgroups-v1

From: Juri Lelli

Date: Wed May 13 2026 - 10:44:01 EST


On 13/05/26 14:15, Yuri Andriaccio wrote:
> Hello,
>
> > This however means we will essentially need to maintain 2 versions of
> > rt.c until v1 is gone? AFAIK v1 rt group implementation is quite a
> > substantial amount of code. :/
>
> If we really need to maintain cgroups v1 maybe it is possible to use the
> same code for HCBS (as I think the behaviors of the old RT_GROUP_SCHED and
> HCBS are 'compatible') and use a subset of the functionalities and
> configuration modes for cgroup v2, i.e., use the cpu.rt_runtime/period_us
> files and disallow running tasks on the root runqueue if they do not belong
> in the root cgroup, which is basically what already happens with
> RT_GROUP_SCHED (right?).
>
> So this would mean that cgroups v1 will still be 'broken' but will be
> compatible with what there is already. And a good amount of old code will be
> gone.
>
> Does this make sense?

Yeah it does, but I'd still be worried about what happens to existing v1
users. Today RT_GROUP_SCHED runs at RT priority and can balance runtime
between CPUs, so tasks don't migrate while runtime moves to them. With
HCBS we'd be switching to deadline servers running at DEADLINE priority,
and tasks migrate to where runtime is available instead.

So v1 users would see their cgroup tasks suddenly running above other RT
tasks, and the switch from runtime balancing to task migration could
mess with cache locality and CPU pinning setups that people have tuned
around the current behavior.

Keeping the same interface files doesn't really hide that we're changing
the whole mechanism underneath. :/

BTW, these concerns apply to v2 as well and we will probably need to
discuss them at some point. But, v2 RT support is new, so breaking
current setups might be to expect to a certain extent?