Struct intel_pstate::PState
source · [−]pub struct PState { /* private fields */ }
Expand description
Handle for fetching and modifying Intel PState kernel parameters.
Note
- Currently, ony Linux is supported.
- Setting parameters will require root permissions.
Implementations
sourceimpl PState
impl PState
sourcepub fn new() -> Result<PState, PStateError>
pub fn new() -> Result<PState, PStateError>
Attempt to fetch a handle to the Intel PState sysfs kernel instance.
sourcepub fn hwp_dynamic_boost(&self) -> Result<Option<bool>, PStateError>
pub fn hwp_dynamic_boost(&self) -> Result<Option<bool>, PStateError>
Get the status of HWP dynamic boost, if it is available.
sourcepub fn set_hwp_dynamic_boost(&self, boost: bool) -> Result<(), PStateError>
pub fn set_hwp_dynamic_boost(&self, boost: bool) -> Result<(), PStateError>
Set the HWP dynamic boost status.
sourcepub fn min_perf_pct(&self) -> Result<u8, PStateError>
pub fn min_perf_pct(&self) -> Result<u8, PStateError>
Get the minimum performance percent.
sourcepub fn set_min_perf_pct(&self, min: u8) -> Result<(), PStateError>
pub fn set_min_perf_pct(&self, min: u8) -> Result<(), PStateError>
Set the minimum performance percent.
sourcepub fn max_perf_pct(&self) -> Result<u8, PStateError>
pub fn max_perf_pct(&self) -> Result<u8, PStateError>
Get the maximum performance percent.
sourcepub fn set_max_perf_pct(&self, max: u8) -> Result<(), PStateError>
pub fn set_max_perf_pct(&self, max: u8) -> Result<(), PStateError>
Set the maximum performance percent.
sourcepub fn no_turbo(&self) -> Result<bool, PStateError>
pub fn no_turbo(&self) -> Result<bool, PStateError>
If true, this signifies that turbo is disabled.
sourcepub fn set_no_turbo(&self, no_turbo: bool) -> Result<(), PStateError>
pub fn set_no_turbo(&self, no_turbo: bool) -> Result<(), PStateError>
Set the no_turbo value; true
will disable turbo.
sourcepub fn values(&self) -> Result<PStateValues, PStateError>
pub fn values(&self) -> Result<PStateValues, PStateError>
Get current PState values.
sourcepub fn set_values(&self, values: PStateValues) -> Result<(), PStateError>
pub fn set_values(&self, values: PStateValues) -> Result<(), PStateError>
Set all values in the given config.
Auto Trait Implementations
impl RefUnwindSafe for PState
impl Send for PState
impl Sync for PState
impl Unpin for PState
impl UnwindSafe for PState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more