util: hostcpu: improve CPU freq code for FreeBSD
Current implementation uses the dev.cpu.0.freq sysctl that is provided by the cpufreq(4) framework and returns the actual CPU frequency. However, there are environments where it's not available, e.g. when running nested in KVM. In this case fall back to hw.clockrate that reports CPU frequency at the boot time. Resolves (hopefully): https://bugzilla.redhat.com/show_bug.cgi?id=1369964
Showing
想要评论请 注册 或 登录