Commit b87ed72e authored by David Dai's avatar David Dai
Browse files

BACKPORT: FROMLIST: cpufreq: add Android-V virtual-cpufreq driver

Introduce a virtualized cpufreq driver on Android-V 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.

Bug: 284368385
Link: https://lore.kernel.org/all/20240127004321.1902477-3-davidai@google.com/


Change-Id: I53047a30fa2843a25bba57c7373fc1829dd08f00
Signed-off-by: default avatarDavid Dai <davidai@google.com>
(cherry picked from commit 9fc999be)
parent e3a0e8fd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment