All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
Subject: [Devel] [PATCH RHEL10 COMMIT] sched/cpuacct: guard ve_root_tg() with CONFIG_CFS_CPULIMIT
Date: Thu, 20 Aug 2026 18:57:54 +0200	[thread overview]
Message-ID: <202608201657.67KGvsFx829144@hci8VM.finist.virtuozzo.com> (raw)
In-Reply-To: <20260625220832.2201873-1-eva.kurchatova@virtuozzo.com>

The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-211.39.1.16.6.vz10
------>
commit bd117ee4adf3296f8cb3910e212a42ce66a61268
Author: Konstantin Khorenko <khorenko@virtuozzo.com>
Date:   Thu Aug 20 18:43:29 2026 +0200

    sched/cpuacct: guard ve_root_tg() with CONFIG_CFS_CPULIMIT
    
    ve_root_tg() has exactly two callers, tg_cpu_rate() and tg_nr_cpus(),
    and both reference it only from inside #ifdef CONFIG_CFS_CPULIMIT: the
    task_group fields they read, ::cpu_rate and ::nr_cpus, do not exist
    without that option.  So with CONFIG_CFS_CPULIMIT=n the helper is not
    used at all, and since our configs set CONFIG_WERROR=y the build fails:
    
      kernel/sched/cpuacct.c:373:27: error: 've_root_tg' defined but not
                                     used [-Werror=unused-function]
    
    x86_64 defconfig hits this: CONFIG_VE defaults to y, while
    CONFIG_CFS_BANDWIDTH - the only thing that selects CONFIG_CFS_CPULIMIT -
    is off.
    
    Compile ve_root_tg() under the same condition as its call sites.
    
    Fixes: 095994c57b84 ("ve/sched/stat: Introduce functions to calculate vcpustat data")
    Feature: sched: emulate virtual cpus for Containers
    https://virtuozzo.atlassian.net/browse/VSTOR-134732
    Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 kernel/sched/cpuacct.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c
index 01a2b2c3c5b7..6b0ed967316e 100644
--- a/kernel/sched/cpuacct.c
+++ b/kernel/sched/cpuacct.c
@@ -370,6 +370,7 @@ struct cgroup_subsys cpuacct_cgrp_subsys = {
 	.threaded       = true,
 };
 
+#ifdef CONFIG_CFS_CPULIMIT
 static struct task_group *ve_root_tg(struct task_group *tg) {
 	struct cgroup_subsys_state *css;
 
@@ -379,6 +380,7 @@ static struct task_group *ve_root_tg(struct task_group *tg) {
 	css = css_ve_root1(&tg->css);
 	return css ? css_tg(css) : NULL;
 }
+#endif
 
 static unsigned int tg_cpu_rate(struct task_group *tg)
 {

  parent reply	other threads:[~2026-08-20 16:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260625220832.2201873-1-eva.kurchatova@virtuozzo.com>
2026-08-20 16:57 ` [Devel] [PATCH RHEL10 COMMIT] sched/loadavg: fix build with CONFIG_CGROUP_SCHED=n Konstantin Khorenko
2026-08-20 16:57 ` [Devel] [PATCH RHEL10 COMMIT] sched/core: guard cpu_cgrp_subsys.depends_on with CONFIG_CGROUP_CPUACCT Konstantin Khorenko
2026-08-20 16:57 ` [Devel] [PATCH RHEL10 COMMIT] sched: move MAX_CPU_RATE out of CONFIG_CFS_CPULIMIT Konstantin Khorenko
2026-08-20 16:57 ` Konstantin Khorenko [this message]
     [not found] ` <20260625220832.2201873-2-eva.kurchatova@virtuozzo.com>
2026-08-21 14:03   ` [Devel] [PATCH vz10 02/14] mm: fix VZ build errors with CONFIG_MEMCG=n Konstantin Khorenko
2026-08-21 16:48 ` [Devel] [PATCH vz10 01/14] sched: fix VZ build errors with CONFIG_CGROUP_SCHED=n Konstantin Khorenko
2026-08-21 16:36 [Devel] [PATCH vz10 04/32] sched/cpuacct: guard ve_root_tg() with CONFIG_CFS_CPULIMIT Konstantin Khorenko
2026-08-21 16:42 ` [Devel] [PATCH RHEL10 COMMIT] " Konstantin Khorenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202608201657.67KGvsFx829144@hci8VM.finist.virtuozzo.com \
    --to=khorenko@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.