mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-28 01:16:50 +00:00
6eb76a1a3c
The performance range of pCPU that the vCPU is running on is limited by the frequency range that it supports. There are some usecases where even running the pCPU at its lowest frequency will still be too fast to accurately emulate a much smaller vCPU. Add a worker to throttle the vCPU by adding a fixed amount of work to the vCPU at varying intervals depending on the vCPU's requested performance. The relationship to determine the interval is: THROTTLE_PERIOD = THROTTLE_TIME / (1.0 - VCPU_PERF / PCPU_PERF); The worker will only throttle vCPU when it requests a performance point below the performance of pCPU@Fmin, but otherwise falls back to using frequency ratios to emulate smaller vCPUs. By emulating correct vCPU sizes and topologies, this enables Cuttlefish to accurately model real life SoCs and kernel scheduler behaviors inside the guest. This allows for better power and performance related testing at scale using ARM64 servers. Bug=b:284367589 Test: tools/presubmit Change-Id: Ide6f61a68ea59cee0db163829839ad575db1b208 Signed-off-by: David Dai <davidai@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5980807 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
.build_test_skip | ||
Cargo.toml |