#[non_exhaustive]pub struct ScxSchedState {
pub aborting: bool,
pub bypass_depth: i32,
pub exit_kind: u32,
pub watchdog_timeout: Option<u64>,
pub source: Option<String>,
pub sched_kva: Option<u64>,
}Expand description
Top-level scheduler state captured from *scx_root.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.aborting: boolscx_sched.aborting. true when the scheduler is in the
abort path; bypass_depth typically rises here.
bypass_depth: i32scx_sched.bypass_depth. Nesting depth of the bypass-mode
stack; non-zero means the kernel is dispatching tasks
without consulting the BPF scheduler.
exit_kind: u32scx_sched.exit_kind — the SCX_EXIT_* enum value latched
at scx_error() time. 0 means no exit yet; non-zero values
match enum scx_exit_kind in kernel/sched/ext_internal.h
(e.g. SCX_EXIT_ERROR = 1024, SCX_EXIT_ERROR_BPF = 1025,
SCX_EXIT_ERROR_STALL = 1026).
watchdog_timeout: Option<u64>scx_sched.watchdog_timeout (jiffies) at the snapshot
instant. None when the field was not captured — either
because the live read_scx_sched_state path was taken on a
kernel that still exposes watchdog_timeout only via the
monitor’s WatchdogOverride plumbing (not as a BTF field on
every release), or because the BPF .bss fallback was used
without the snapshot var set. Some when populated via the
probe BPF .bss snapshot
(ktstr_exit_watchdog_timeout).
source: Option<String>Provenance tag identifying which path produced this state.
None for the default-built / serde-deserialized case where
the source isn’t recorded; Some("live") when populated by
read_scx_sched_state reading *scx_root directly;
Some("bss_snapshot") when populated from the probe BPF
.bss snapshot fallback (the ktstr_exit_* vars). Lets the
dump consumer distinguish “scheduler was alive at freeze
time” from “scheduler had already torn down and we read the
pre-teardown snapshot the BPF probe latched”.
sched_kva: Option<u64>Kernel virtual address of the scx_sched instance these
values describe. None when not captured. Same provenance
rule as Self::source: live path stamps the resolved
*scx_root value; the BPF .bss snapshot stamps the
ktstr_exit_sched_kva field. Lets a consumer correlate
dumps across reloads (a different scx_sched instance has a
different KVA).
Trait Implementations§
Source§impl Clone for ScxSchedState
impl Clone for ScxSchedState
Source§fn clone(&self) -> ScxSchedState
fn clone(&self) -> ScxSchedState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScxSchedState
impl Debug for ScxSchedState
Source§impl Default for ScxSchedState
impl Default for ScxSchedState
Source§fn default() -> ScxSchedState
fn default() -> ScxSchedState
Source§impl<'de> Deserialize<'de> for ScxSchedState
impl<'de> Deserialize<'de> for ScxSchedState
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>,
Auto Trait Implementations§
impl Freeze for ScxSchedState
impl RefUnwindSafe for ScxSchedState
impl Send for ScxSchedState
impl Sync for ScxSchedState
impl Unpin for ScxSchedState
impl UnwindSafe for ScxSchedState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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>
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