]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: hostcpu: improve CPU freq code for FreeBSD
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Wed, 31 Aug 2016 05:14:41 +0000 (08:14 +0300)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Tue, 6 Sep 2016 15:27:56 +0000 (18:27 +0300)
commitf8435a434abf0d3e47daad7f152d9db96dd38f5d
tree01bc53b13425d7c6f951fe41c535a3d1d03143c7
parentfb2025ede9ecde1aa04ba6e01ce0c82c9e42dc66
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
src/util/virhostcpu.c