mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-04 14:36:55 +00:00
The design of ACRN CPU performance management is to let hardware do the autonomous frequency selection(or set to a fixed value), and remove guest's ability to control CPU frequency. This patch is to implement the CPU frequency initializer, which will setup CPU frequency base on the performance policy type. Two performance policy types are provided for user to choose from: - 'Performance': CPU runs at its CPU runs at its maximum frequency. Enable hardware autonomous frequency selection if HWP is presented. - 'Nominal': CPU runs at its guaranteed frequency. The policy type is passed to hypervisor through boot parameter, as either 'cpu_perf_policy=Nominal' or 'cpu_perf_policy=Performance'. The default type is 'Performance'. Both HWP and ACPI p-state are supported. HWP is the first choice, for it provides hardware autonomous frequency selection, while keeps frequency transaction time low. Two functions are added to the hypervisor to call: - init_frequency_policy(): called by BSP at start up time. It processes the boot parameters, and enables HWP if it is presented. - apply_frequency_policy(): called after init_frequency_policy(). It applies initial CPU frequency policy setting for each core. It uses a set of frequency limits data struct to quickly decide what the highest/nominal frequency is. The frequency limits are generated by config-tools. The hypervisor will not be governing CPU frequency after initial policy is applied. Cores running RTVMs are fixed to nominal/guaranteed frequency, to get more certainty in latency. This is done by setting the core's frequency limits to highest=lowest=nominal in config-tools. Tracked-On: #8168 Signed-off-by: Wu Zhou <wu.zhou@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com> |
||
---|---|---|
.. | ||
boot | ||
configs | ||
guest | ||
lib | ||
seed | ||
cpu_caps.c | ||
cpu_state_tbl.c | ||
cpu.c | ||
e820.c | ||
exception.c | ||
gdt.c | ||
idt.S | ||
init.c | ||
ioapic.c | ||
irq.c | ||
lapic.c | ||
mmu.c | ||
nmi.c | ||
notify.c | ||
page.c | ||
pagetable.c | ||
platform_caps.c | ||
pm.c | ||
rdt.c | ||
rtcm.c | ||
sched.S | ||
security.c | ||
sgx.c | ||
trampoline.c | ||
tsc_deadline_timer.c | ||
tsc.c | ||
vmx.c | ||
vtd.c | ||
wakeup.S |