#[non_exhaustive]pub struct DsqState {
pub id: u64,
pub origin: String,
pub nr: u32,
pub seq: u32,
pub task_kvas: Vec<u64>,
pub truncated: bool,
}Expand description
Snapshot of one DSQ’s state — built-in (per-CPU local, per-CPU bypass, per-node global) or user-allocated.
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.id: u64scx_dispatch_q.id — built-in DSQs use synthetic ids
(SCX_DSQ_LOCAL, SCX_DSQ_GLOBAL per-node); user DSQs
carry the BPF-allocated id.
origin: StringOperator-facing tag describing where the DSQ came from:
"local cpu N", "bypass cpu N", "global node N", or
"user". Aligned with the kernel’s own scx_dump_state
terminology where comparable.
nr: u32scx_dispatch_q.nr — number of tasks currently queued.
seq: u32scx_dispatch_q.seq — BPF-iter seq counter, used by the
dual-snapshot delta to distinguish dead vs busy DSQs:
Δnr=0 + Δseq=0 is a dead DSQ; Δseq>>Δ(seq-nr) indicates
unbounded queue growth.
task_kvas: Vec<u64>task_struct KVAs walked off the DSQ’s list_head. Same
shape as RqScxState::runnable_task_kvas — feeds into
the same per-task enrichment pipeline.
truncated: boolTrue when the DSQ list walk hit the
MAX_NODES_PER_LIST cap before reaching the head.
Distinct from nr: the kernel may report nr larger than
our walk cap on legitimately-deep DSQs.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DsqState
impl<'de> Deserialize<'de> for DsqState
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 DsqState
impl RefUnwindSafe for DsqState
impl Send for DsqState
impl Sync for DsqState
impl Unpin for DsqState
impl UnwindSafe for DsqState
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