#[non_exhaustive]pub enum DelayacctState {
ConfigOff,
RuntimeOff,
On,
}Expand description
Build + runtime state of kernel delay accounting, probed from
/proc/sys/kernel/task_delayacct. Determines which taskstats
delay-family fields are actually being populated:
cpu_delay_*come fromtsk->sched_infoand are filled UNCONDITIONALLY bydelayacct_add_tsk(kernel/delayacct.c) whenever CONFIG_TASK_DELAY_ACCT is built in — they survive the runtime toggle, so they read real values in bothSelf::OnandSelf::RuntimeOff.- the per-resource lock categories (
blkio,swapin,freepages,thrashing,compact,wpcopy,irq) are gated bytsk->delays, allocated at fork only whendelayacct_on, so they read genuine values only inSelf::On.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ConfigOff
/proc/sys/kernel/task_delayacct absent. The sysctl is
registered only under CONFIG_TASK_DELAY_ACCT
(kernel/delayacct.c), so an absent file means the option is not
built in and NO delay-family field is populated. (Under ktstr’s
root execution a present file is always readable, so absent is
the only not-On/not-RuntimeOff outcome.)
RuntimeOff
File present, reads 0 — built in but the runtime toggle is
off. cpu_delay_* still populate; the lock categories read zero
for tasks forked while off.
On
File present, reads 1 — delay accounting fully active.
Trait Implementations§
Source§impl Clone for DelayacctState
impl Clone for DelayacctState
Source§fn clone(&self) -> DelayacctState
fn clone(&self) -> DelayacctState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DelayacctState
impl Debug for DelayacctState
Source§impl<'de> Deserialize<'de> for DelayacctState
impl<'de> Deserialize<'de> for DelayacctState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DelayacctState
impl Display for DelayacctState
Source§impl PartialEq for DelayacctState
impl PartialEq for DelayacctState
Source§impl Serialize for DelayacctState
impl Serialize for DelayacctState
impl Copy for DelayacctState
impl Eq for DelayacctState
impl StructuralPartialEq for DelayacctState
Auto Trait Implementations§
impl Freeze for DelayacctState
impl RefUnwindSafe for DelayacctState
impl Send for DelayacctState
impl Sync for DelayacctState
impl Unpin for DelayacctState
impl UnwindSafe for DelayacctState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more