Skip to content

Software incompatibilities and workarounds

CyrIng edited this page Jun 10, 2022 · 14 revisions

CoreFreq is incompatible with the below softwares.

(mostly due to processor registers usage conflicts)

VirtualBox

0x40000010 counter, aka HV_X64_MSR_VP_RUNTIME, is no more available.

nmi_watchdog

  • symptoms
    PMC fixed counters CORE_PERF_FIXED_CTR1 and CORE_PERF_FIXED_CTR2 usage conflict.
int watchdog_nmi_enable(unsigned int cpu)
  • workaround: two solutions.
  1. In your kernel boot loader (SysLinux, Grub) add:
nmi_watchdog=0
  1. Build CoreFreq with APERF and MPERF registers.
    remark: this is since the default configuration
make MSR_CORE_PERF_UCC=MSR_IA32_APERF MSR_CORE_PERF_URC=MSR_IA32_MPERF

pmu_intel

  • symptoms

    PMC fixed counters CORE_PERF_FIXED_CTR1 and CORE_PERF_FIXED_CTR2 usage conflict.

  • see pmu_intel.c

static void reprogram_fixed_counters(struct kvm_pmu *pmu, u64 data)
  • see core.c
static void intel_pmu_nhm_workaround(void)
  • workaround
make MSR_CORE_PERF_UCC=MSR_IA32_APERF MSR_CORE_PERF_URC=MSR_IA32_MPERF

numatop

  • symptoms
    tbd
  • workaround
    tbd

CoreFreq does not run well with the followings:

Kernel Crash Dump

  • symptoms
    using kernel 3.10 , issues happen in kmem_cache_alloc() and kmem_cache_destroy() functions
  • workaround
    disable crashkernel from the Kernel command line
# edit /etc/default/grub and append the following arguments to GRUB_CMDLINE_LINUX
GRUB_CMDLINE_LINUX="nmi_watchdog=0 crashkernel=0"
# update Grub configuration and reboot
grub2-mkconfig -o /boot/grub2/grub.cfg
shutdown -r now

qemu-system-x86_64

  • symptoms
    when running qemu with argument -cpu , QEMU takes the leadership on the PMC counters; some MSR registers are not implemented thus ratios are unavailable.
  • workaround
qemu-system-x86_64 -enable-kvm -cpu max,hv-runtime

perf

  • symptoms
    PMC fixed counters MSR_CORE_PERF_FIXED_CTR0, CORE_PERF_FIXED_CTR1 and CORE_PERF_FIXED_CTR2 usage conflict.
  • workaround
make MSR_CORE_PERF_UCC=MSR_IA32_APERF MSR_CORE_PERF_URC=MSR_IA32_MPERF

remark: this will only solve the UCC and URC counters, not the INST counter

k10temp, edac, and other Zenpower kernel modules

  • symptoms
    AMD processors of Zen architecture will freeze after a while.

    CoreFreq must not share the SMU registers access with any module that makes use of the Linux kernel function amd_smn_read(), like k10temp; or which directly addresses the SMU.
    The same issue may happen with amd64_edac kernel module (ECC enabled in EPYC, Threadripper)

  • workaround

  1. avoid running a hardware monitoring tool, based on the Linux hwmon, in parallel of CoreFreq
  2. unload or blacklist any SMU driver before starting corefreqk.ko

CoreFreq claims a unique access to the AMD Zen architecture for thermal sensors, voltages and so on.

Tracing issue

Valgrind

  • symptoms

lax-ioctls Reduce accuracy of ioctl checking.

  • workaround
valgrind --sim-hints=lax-ioctls -v corefreqd