pub struct TopologyJson {
pub num_numa_nodes: u32,
pub num_llcs: u32,
pub cores_per_llc: u32,
pub threads_per_core: u32,
}Expand description
JSON-friendly mirror of Topology for the verifier wire format.
Captures the four-tuple shape (numa nodes × LLCs × cores × threads)
the per-scheduler baseline topology was declared with. The verifier
uses this when computing the sweep matrix — the baseline anchors
the default cell when no gauntlet preset matches the
scheduler’s constraints.
Fields§
§num_numa_nodes: u32NUMA node count. Maps to Topology::num_numa_nodes.
num_llcs: u32Last-level cache (LLC) count, equivalent to “sockets” on
pre-CCX/CCD x86. Maps to Topology::num_llcs.
cores_per_llc: u32Physical cores per LLC. Mirrors Topology::cores_per_llc.
threads_per_core: u32Hardware threads per physical core. 1 for non-SMT; 2
for x86 hyperthreading. Mirrors Topology::threads_per_core.
Implementations§
Source§impl TopologyJson
impl TopologyJson
Sourcepub const SINGLE_CPU: Self
pub const SINGLE_CPU: Self
Single-CPU baseline: 1 NUMA node × 1 LLC × 1 core × 1 thread.
Used by cargo ktstr verifier and verifier-pipeline tests as
the no-scheduling-workload default.
Trait Implementations§
Source§impl Clone for TopologyJson
impl Clone for TopologyJson
Source§fn clone(&self) -> TopologyJson
fn clone(&self) -> TopologyJson
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TopologyJson
impl Debug for TopologyJson
Source§impl<'de> Deserialize<'de> for TopologyJson
impl<'de> Deserialize<'de> for TopologyJson
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>,
Source§impl From<Topology> for TopologyJson
Project a Topology into its wire-format mirror. Drops the
nodes and distances fields (uniform-distribution shape only);
callers that need to preserve explicit per-node config or distance
matrices must not use this conversion. Takes Topology by value
(it derives Copy) to match the by-value shape of
[From<TopologyConstraintsJson> for TopologyConstraints].
impl From<Topology> for TopologyJson
Project a Topology into its wire-format mirror. Drops the
nodes and distances fields (uniform-distribution shape only);
callers that need to preserve explicit per-node config or distance
matrices must not use this conversion. Takes Topology by value
(it derives Copy) to match the by-value shape of
[From<TopologyConstraintsJson> for TopologyConstraints].
Source§impl PartialEq for TopologyJson
impl PartialEq for TopologyJson
Source§impl Serialize for TopologyJson
impl Serialize for TopologyJson
Source§impl TryFrom<TopologyJson> for Topology
Result-based validation for wire-format topology values. Lets the
verifier dispatch surface a per-cell “topology rejected” diagnostic
instead of taking the Topology::new panic surface in the builder.
Mirrors Topology::validate — any field == 0, overflow in total
CPU count, or llcs not divisible by numa_nodes returns Err.
The result is a uniform-distribution Topology (nodes = None,
distances = None); explicit per-node config and distance matrices
require constructing Topology directly.
impl TryFrom<TopologyJson> for Topology
Result-based validation for wire-format topology values. Lets the
verifier dispatch surface a per-cell “topology rejected” diagnostic
instead of taking the Topology::new panic surface in the builder.
Mirrors Topology::validate — any field == 0, overflow in total
CPU count, or llcs not divisible by numa_nodes returns Err.
The result is a uniform-distribution Topology (nodes = None,
distances = None); explicit per-node config and distance matrices
require constructing Topology directly.
impl Copy for TopologyJson
impl Eq for TopologyJson
impl StructuralPartialEq for TopologyJson
Auto Trait Implementations§
impl Freeze for TopologyJson
impl RefUnwindSafe for TopologyJson
impl Send for TopologyJson
impl Sync for TopologyJson
impl Unpin for TopologyJson
impl UnwindSafe for TopologyJson
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<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
§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
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
§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
§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