Re: [patch 0/3] KVM CPU frequency change hypercalls
From: Marcelo Tosatti
Date: Thu Feb 23 2017 - 20:16:28 EST
On Thu, Feb 23, 2017 at 06:35:24PM +0100, Paolo Bonzini wrote:
> On 03/02/2017 20:09, Radim Krcmar wrote:
> > One reason why we have a kernel/userspace split is to allow sharing of
> > CPU time. Each application then its state that the kernel keeps track
> > of and saves/restores while time-multiplexing.
> > Our frequency scaling interface goes against the idea -- guest kernel
> > cannot schedule multiple userspaces on the same vCPU, because they could
> > conflict by overriding frequency.
> > i.e. our feature implies userspace tasks pinned to isolated vCPUs.
This is how cpufreq-userspace works:
On all other cpufreq implementations, these boundaries still need to
be set. Then, a "governor" must be selected. Such a "governor" decides
what speed the processor shall run within the boundaries. One such
"governor" is the "userspace" governor. This one allows the user - or
a yet-to-implement userspace program - to decide what specific speed
the processor shall run at.
> That's bad. This feature is broken by design unless it does proper
> save/restore across preemption.
Whats the current usecase, or forseeable future usecase, for save/restore
across preemption again? (which would validate the broken by design
> You don't need a hypercall. Add a cpufreq driver in DPDK that doesn't
> use sysfs, and connect it to a daemon in the host through virtio-serial
> or vsock.
Hypercalls overcome the problems mentioned in the first email
of the thread, i think you missed them:
"[patch 0/3] KVM CPU frequency change hypercalls"