[Devel] [PATCH vz10 v3 2/2] sched: Support nr_cpus in cgroup2 as well
Dmitry Sepp
dmitry.sepp at virtuozzo.com
Thu Mar 19 11:28:35 MSK 2026
Make the control available for the cgroup2 hierarchy as well.
https://virtuozzo.atlassian.net/browse/VSTOR-124385
Signed-off-by: Dmitry Sepp <dmitry.sepp at virtuozzo.com>
---
kernel/sched/core.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index cf2afc1307c5..0423c1b323ca 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -10440,6 +10440,14 @@ static struct cftype cpu_files[] = {
.seq_show = cpu_uclamp_max_show,
.write = cpu_uclamp_max_write,
},
+#endif
+#ifdef CONFIG_CFS_CPULIMIT
+ {
+ .name = "nr_cpus",
+ .flags = CFTYPE_NOT_ON_ROOT,
+ .read_u64 = nr_cpus_read_u64,
+ .write_u64 = nr_cpus_write_u64,
+ },
#endif
{
.name = "proc.stat",
--
2.47.1
More information about the Devel
mailing list