mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-02 21:00:55 +00:00
xenruntime: gracefully handle power management errors
This commit is contained in:
parent
6df0fe41c8
commit
0c2eb591d9
@ -1,5 +1,6 @@
|
||||
use anyhow::Result;
|
||||
use indexmap::IndexMap;
|
||||
use log::info;
|
||||
use xencall::sys::{CpuId, SysctlCputopo};
|
||||
|
||||
use crate::RuntimeContext;
|
||||
@ -151,7 +152,10 @@ impl PowerManagementContext {
|
||||
.xen
|
||||
.call
|
||||
.set_turbo_mode(CpuId::All, enable)
|
||||
.await?;
|
||||
.await
|
||||
.unwrap_or_else(|error| {
|
||||
info!("non-fatal error while setting SMT policy: {:?}", error);
|
||||
});
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -161,7 +165,10 @@ impl PowerManagementContext {
|
||||
.xen
|
||||
.call
|
||||
.set_cpufreq_gov(CpuId::All, policy)
|
||||
.await?;
|
||||
.await
|
||||
.unwrap_or_else(|error| {
|
||||
info!("non-fatal error while setting scheduler policy: {:?}", error);
|
||||
});
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user