CHROMIUM: BACKPORT: FROMLIST: cpufreq: add kvm-cpufreq driver
Introduce a virtualized cpufreq driver for guest kernels to improve performance and power of workloads within VMs. This driver does two main things: 1. Sends utilization of vCPUs as a hint to the host. The host uses the hint to schedule the vCPU threads and decide physical CPU frequency. 2. If a VM does not support a virtualized FIE(like AMUs), it uses hypercalls to update the guest's frequency scaling factor periodically by querying the host CPU frequency. This enables accurate Per-Entity Load Tracking for tasks running in the guest. Note that because the host already employs a rate_limit_us, we set the transition_delay_us of the cpufreq policy to a miniscule value(1) to avoid any additional delays between when the runqueue's util change and a frequency response on the host. Co-developed-by:Saravana Kannan <saravanak@google.com> Signed-off-by:
Saravana Kannan <saravanak@google.com> Signed-off-by:
David Dai <davidai@google.com> (am from https://patchwork.kernel.org/patch/13195012/) (also found at https://lore.kernel.org/r/20230330224348.1006691-7-davidai@google.com ) BUG=b:249685960 TEST=Build UPSTREAM-TASK=b:256983979 Change-Id: I372da144f6289363247cb840cb5ac1e31cb7f950 Signed-off-by:
Masami Hiramatsu <mhiramat@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4236484 Reviewed-by:
Suleiman Souhlal <suleiman@chromium.org>
Loading
Please sign in to comment