Skip to content

Commit 3149cd5

Browse files
gghhingomolnar
authored andcommitted
x86: Print ratio freq_max/freq_base used in frequency invariance calculations
The value freq_max/freq_base is a fundamental component of frequency invariance calculations. It may come from a variety of sources such as MSRs or ACPI data, tracking it down when troubleshooting a system could be non-trivial. It is worth saving it in the kernel logs. # dmesg | grep 'Estimated ratio of average max' [ 14.024036] smpboot: Estimated ratio of average max frequency by base frequency (times 1024): 1289 Signed-off-by: Giovanni Gherdovich <ggherdovich@suse.cz> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lkml.kernel.org/r/20201112182614.10700-4-ggherdovich@suse.cz
1 parent 976df7e commit 3149cd5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

arch/x86/kernel/smpboot.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,6 +2110,7 @@ static void init_freq_invariance(bool secondary, bool cppc_ready)
21102110
if (ret) {
21112111
init_counter_refs();
21122112
static_branch_enable(&arch_scale_freq_key);
2113+
pr_info("Estimated ratio of average max frequency by base frequency (times 1024): %llu\n", arch_max_freq_ratio);
21132114
} else {
21142115
pr_debug("Couldn't determine max cpu frequency, necessary for scale-invariant accounting.\n");
21152116
}

0 commit comments

Comments
 (0)