diff --git a/crates/runtime/src/power.rs b/crates/runtime/src/power.rs index 055a837..f5dec7f 100644 --- a/crates/runtime/src/power.rs +++ b/crates/runtime/src/power.rs @@ -111,20 +111,20 @@ impl PowerManagementContext { /// are treated as p-cores, while e-cores behave as standard cores. /// If there is a p-core/e-core split, then CPU class will be defined as /// `CpuClass::Performance` or `CpuClass::Efficiency`, else `CpuClass::Standard`. - pub async fn cpu_topology(self) -> Result> { + pub async fn cpu_topology(&self) -> Result> { let xentopo = self.context.xen.call.cpu_topology().await?; let logicaltopo = labelled_topo(&xentopo); Ok(logicaltopo) } /// Enable or disable SMT awareness in the scheduler. - pub async fn set_smt_policy(self, enable: bool) -> Result<()> { + pub async fn set_smt_policy(&self, enable: bool) -> Result<()> { self.context.xen.call.set_turbo_mode(CpuId::All, enable).await?; Ok(()) } /// Set scheduler policy name. - pub async fn set_scheduler_policy(self, policy: impl AsRef) -> Result<()> { + pub async fn set_scheduler_policy(&self, policy: impl AsRef) -> Result<()> { self.context.xen.call.set_cpufreq_gov(CpuId::All, policy).await?; Ok(()) }