Re: [RFC PATCH v4 18/28] sched/rt: Remove support for cgroups-v1

From: Juri Lelli

Date: Wed Jan 21 2026 - 06:16:17 EST


Hello,

On 01/12/25 13:41, Yuri Andriaccio wrote:
> Disable control files for cgroups-v1, and allow only cgroups-v2. This
> should simplify maintaining the code, also because cgroups-v1 are
> deprecated.

I still wonder if we want/need to be a little more verbose about why we
think this is good, as it is quite a change. But, I'll let Peter and
others to chime in.

> Set the default rt-cgroups runtime to zero, otherwise a cgroup-v1 kernel
> will not be able to start SCHED_DEADLINE tasks. The bandwidth for
> rt-cgroups must then be manually assigned after the kernel boots.
>
> Signed-off-by: Yuri Andriaccio <yurand2000@xxxxxxxxx>
> ---

...

> static int __init cpu_rt_group_init(void)
> {
> - if (!rt_group_sched_enabled())
> - return 0;
> -
> - WARN_ON(cgroup_add_legacy_cftypes(&cpu_cgrp_subsys, rt_group_files));
> return 0;
> }
> subsys_initcall(cpu_rt_group_init);

Looks like the whole function can be removed?

Thanks,
Juri