diff options
author | David Dai <davidai@google.com> | 2024-09-18 17:08:33 -0700 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2024-10-29 12:05:14 +0530 |
commit | 4fd06a5358e0d888d1bf23d274971ea7d1f45aad (patch) | |
tree | 014938156f36840f3aa89efd9b5825507af39329 /drivers/cpufreq/Kconfig | |
parent | 984638e4430b75bd38dba723e42aad4c748fed70 (diff) | |
download | lwn-4fd06a5358e0d888d1bf23d274971ea7d1f45aad.tar.gz lwn-4fd06a5358e0d888d1bf23d274971ea7d1f45aad.zip |
cpufreq: add virtual-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 the frequency 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 queries the
host CPU frequency by reading a MMIO region of a virtual cpufreq device
to update the guest's frequency scaling factor periodically. This enables
accurate Per-Entity Load Tracking for tasks running in the guest.
Co-developed-by: Saravana Kannan <saravanak@google.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Signed-off-by: David Dai <davidai@google.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/Kconfig')
-rw-r--r-- | drivers/cpufreq/Kconfig | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig index 2561b215432a..92a83a9bb2e1 100644 --- a/drivers/cpufreq/Kconfig +++ b/drivers/cpufreq/Kconfig @@ -217,6 +217,20 @@ config CPUFREQ_DT If in doubt, say N. +config CPUFREQ_VIRT + tristate "Virtual cpufreq driver" + depends on GENERIC_ARCH_TOPOLOGY + help + This adds a virtualized cpufreq driver for guest kernels that + read/writes to a MMIO region for a virtualized cpufreq device to + communicate with the host. It sends performance requests to the host + which gets used as a hint to schedule vCPU threads and select CPU + frequency. If a VM does not support a virtualized FIE such as AMUs, + it updates the frequency scaling factor by polling host CPU frequency + to enable accurate Per-Entity Load Tracking for tasks running in the guest. + + If in doubt, say N. + config CPUFREQ_DT_PLATDEV tristate "Generic DT based cpufreq platdev driver" depends on OF |