mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-07 20:00:13 +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:
@@ -28,12 +28,14 @@ struct sched_object {
|
||||
};
|
||||
|
||||
struct sched_context {
|
||||
uint64_t flags;
|
||||
uint64_t mwait_flags;
|
||||
uint64_t rserved[6];
|
||||
spinlock_t runqueue_lock;
|
||||
struct list_head runqueue;
|
||||
uint64_t flags;
|
||||
struct sched_object *curr_obj;
|
||||
spinlock_t scheduler_lock;
|
||||
};
|
||||
} __aligned(64);
|
||||
|
||||
void init_scheduler(void);
|
||||
void switch_to_idle(run_thread_t idle_thread);
|
||||
|
Reference in New Issue
Block a user