[Devel] [PATCH RHEL10 COMMIT] cpuacct: expose interface file in cgroup v2

Konstantin Khorenko khorenko at virtuozzo.com
Fri Nov 21 21:04:51 MSK 2025


The commit is pushed to "branch-rh10-6.12.0-55.13.1.2.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-55.13.1.2.20.vz10
------>
commit 4c3c1168fc69f9e9edee0e3c6c8837064a9d886b
Author: Aleksei Oladko <aleksey.oladko at virtuozzo.com>
Date:   Fri Nov 21 16:30:07 2025 +0000

    cpuacct: expose interface file in cgroup v2
    
    In commit 0a76d99f5aaea ("cpuacct: implicitly enable cpuacct controller in
    cgroup-v2"), the cpuacct controller was implicitly enabled in cgroup v2.
    
    This patch enables user access to the cpuacct interface files in cgroup v2,
    allowing statistics such as cpuacct.usage_percpu to be retrieved in the same way
    as in cgroup v1.
    
    https://virtuozzo.atlassian.net/browse/VSTOR-100092
    Signed-off-by: Aleksei Oladko <aleksey.oladko at virtuozzo.com>
    
    Feature: sched: emulate virtual cpus for Containers
---
 kernel/sched/cpuacct.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c
index 65a331807e5d5..f1fe372de0941 100644
--- a/kernel/sched/cpuacct.c
+++ b/kernel/sched/cpuacct.c
@@ -363,6 +363,7 @@ struct cgroup_subsys cpuacct_cgrp_subsys = {
 	.css_alloc	= cpuacct_css_alloc,
 	.css_free	= cpuacct_css_free,
 	.legacy_cftypes	= files,
+	.dfl_cftypes	= files, /* Same files for v1 and v2 */
 	.early_init	= true,
 
 	.implicit_on_dfl = true,


More information about the Devel mailing list