Make the control available for the cgroup2 hierarchy as well.

https://virtuozzo.atlassian.net/browse/VSTOR-124385

Signed-off-by: Dmitry Sepp <[email protected]>
---
 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

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to