Re: ...\n

From: Paolo Bonzini
Date: Wed Jun 01 2022 - 04:59:31 EST


On 6/1/22 09:57, Vitaly Kuznetsov wrote:
I'll bite... What's ludicrous about wanting to run a guest at a lower CPU freq to minimize observable change in whatever workload it is running?
Well, the right API is cpufreq, there's no need to make it a KVM
functionality.
KVM may probably use the cpufreq API to run each vCPU at the desired
frequency: I don't quite see how this can be done with a VMM today when
it's not a 1-vCPU-per-1-pCPU setup.

True, but then there's also a policy issue, in that KVM shouldn't be allowed to *bump* the frequency if userspace would ordinarily not have access to the cpufreq files in sysfs.

All in all, I think it's simpler to let privileged userspace (which knows when it has a 1:1 mapping of vCPU to pCPU) handle it with cpufreq.

Paolo