feature(power-management-defaults): set an initial power management policy (#219)

The default policy enables performance mode and SMT.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
This commit is contained in:
Ariadne Conill 2024-06-30 20:37:17 -07:00 committed by GitHub
parent 35d585e3b1
commit 0e64d4ea79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,6 +124,12 @@ impl Daemon {
let guest_reconciler_task = guest_reconciler.launch(guest_reconciler_receiver).await?;
let generator_task = generator.launch().await?;
// TODO: Create a way of abstracting early init tasks in kratad.
// TODO: Make initial power management policy configurable.
let power = runtime.power_management_context().await?;
power.set_smt_policy(true).await?;
power.set_scheduler_policy("performance".to_string()).await?;
Ok(Self {
store,
_config: config,