[Devel] [PATCH RHEL9 COMMIT] x86, cpuinfo: Call sched_cpulimit_scale_cpufreq() when reading cpuinfo
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Mar 2 14:22:35 MSK 2023
The commit is pushed to "branch-rh9-5.14.0-162.6.1.vz9.18.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-162.6.1.vz9.18.11
------>
commit 07555a1fc40a3de6e0ce98cc2545726005caade0
Author: Nikolay Borisov <nikolay.borisov at virtuozzo.com>
Date: Tue Feb 14 12:51:39 2023 +0200
x86, cpuinfo: Call sched_cpulimit_scale_cpufreq() when reading cpuinfo
During rebase it seems the call to sched_cpulimit_scale_cpufreq() was
lost. That call is supposed to scale the reported cpu frequency
according to cpu count in the cpu cgroup.
Resurrect the call in the show_cpuinfo().
Fixes: b80ac0b20f1a ("sched: Port CONFIG_CFS_CPULIMIT feature")
https://jira.sw.ru/browse/PSBM-142414
Signed-off-by: Nikolay Borisov <nikolay.borisov at virtuozzo.com>
Feature: sched: ability to limit number of CPUs available to a CT
---
arch/x86/kernel/cpu/proc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
index a06281fcbd5c..783a165ca75a 100644
--- a/arch/x86/kernel/cpu/proc.c
+++ b/arch/x86/kernel/cpu/proc.c
@@ -146,6 +146,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
freq = cpufreq_quick_get(cpu);
if (!freq)
freq = cpu_khz;
+ freq = sched_cpulimit_scale_cpufreq(freq);
seq_printf(m, "cpu MHz\t\t: %u.%03u\n",
freq / 1000, (freq % 1000));
}
More information about the Devel
mailing list