Displaying 2 results from an estimated 2 matches for "x86_feature_aperfmperf".
2019 Mar 30
1
[PATCH 2/5] x86: Convert some slow-path static_cpu_has() callers to boot_cpu_has()
...a/arch/x86/kernel/cpu/aperfmperf.c b/arch/x86/kernel/cpu/aperfmperf.c
index 804c49493938..64d5aec24203 100644
--- a/arch/x86/kernel/cpu/aperfmperf.c
+++ b/arch/x86/kernel/cpu/aperfmperf.c
@@ -83,7 +83,7 @@ unsigned int aperfmperf_get_khz(int cpu)
if (!cpu_khz)
return 0;
- if (!static_cpu_has(X86_FEATURE_APERFMPERF))
+ if (!boot_cpu_has(X86_FEATURE_APERFMPERF))
return 0;
aperfmperf_snapshot_cpu(cpu, ktime_get(), true);
@@ -99,7 +99,7 @@ void arch_freq_prepare_all(void)
if (!cpu_khz)
return;
- if (!static_cpu_has(X86_FEATURE_APERFMPERF))
+ if (!boot_cpu_has(X86_FEATURE_APERFMPERF))
return;...
2012 May 22
20
[PATCH] RFC: Linux: disable APERF/MPERF feature in PV kernels
Hi,
while testing some APERF/MPERF semantics I discovered that this feature
is enabled in Xen Dom0, but is not reliable.
The Linux kernel''s scheduler uses this feature if it sees the CPUID bit,
leading to costly RDMSR traps (a few 100,000s during a kernel compile)
and bogus values due to VCPU migration during the measurement.
The attached patch explicitly disables this CPU capability