[Devel] [PATCH vz10 2/2] sched: Support nr_cpus in cgroup2 as well

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Mon Mar 16 18:58:31 MSK 2026


Reviewed-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>

On 3/16/26 16:17, Dmitry Sepp wrote:
> 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 | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index f66ee9d07387..3b13fd3a3f7a 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -10431,6 +10431,13 @@ static struct cftype cpu_files[] = {
>  		.seq_show = cpu_uclamp_max_show,
>  		.write = cpu_uclamp_max_write,
>  	},
> +#endif
> +#ifdef CONFIG_CFS_CPULIMIT
> +	{
> +		.name = "nr_cpus",
> +		.read_u64 = nr_cpus_read_u64,
> +		.write_u64 = nr_cpus_write_u64,
> +	},
>  #endif
>  	{
>  		.name = "proc.stat",

-- 
Best regards, Pavel Tikhomirov
Senior Software Developer, Virtuozzo.



More information about the Devel mailing list