[Devel] [vz9 PATCH] x86, cpuinfo: Call sched_cpulimit_scale_cpufreq when reading cpuinfo
Nikolay Borisov
nikolay.borisov at virtuozzo.com
Tue Feb 14 13:51:39 MSK 2023
During rebase it seems the call to sched_cpulimit_scale_cpufreq which
is supposed to scale the reported cpu frequency according to cpu cpount
in the cpu cgroup. This fixes the issue.
https://jira.sw.ru/browse/PSBM-142414
Signed-off-by: Nikolay Borisov <nikolay.borisov at virtuozzo.com>
---
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));
}
--
2.34.1
More information about the Devel
mailing list