mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-07 17:46:15 +00:00
HV: Use the mwait instead of pause for cpu_idle
Now it will use the pause when cpu is in idle state. It will consume more power. If the mwait is supported, it will use the monitor/mwait to enter the deep CPU C-state. It helps to save power. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
This commit is contained in:
@@ -92,9 +92,7 @@ void default_idle(__unused struct sched_object *obj)
|
||||
} else if (need_shutdown_vm(pcpu_id)) {
|
||||
shutdown_vm_from_idle(pcpu_id);
|
||||
} else {
|
||||
CPU_IRQ_ENABLE();
|
||||
cpu_do_idle();
|
||||
CPU_IRQ_DISABLE();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user