pub struct NumaConfig {
pub num_nodes: usize,
pub workers_per_node: usize,
}Expand description
Configuration for NUMA-aware scheduling.
Fields§
§num_nodes: usizeNumber of NUMA nodes.
workers_per_node: usizeWorkers per NUMA node.
Implementations§
Source§impl NumaConfig
impl NumaConfig
Sourcepub fn with_topology(num_nodes: usize, workers_per_node: usize) -> Self
pub fn with_topology(num_nodes: usize, workers_per_node: usize) -> Self
Creates a config for a specific NUMA topology.
Sourcepub fn auto_detect(num_workers: usize) -> Self
pub fn auto_detect(num_workers: usize) -> Self
Auto-detect NUMA topology (approximation based on worker count).
Heuristic: assume 2 NUMA nodes for > 8 cores, 1 otherwise.
Sourcepub fn worker_node(&self, worker_id: usize) -> NumaNode
pub fn worker_node(&self, worker_id: usize) -> NumaNode
Returns the NUMA node for a worker ID.
Trait Implementations§
Source§impl Clone for NumaConfig
impl Clone for NumaConfig
Source§fn clone(&self) -> NumaConfig
fn clone(&self) -> NumaConfig
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 NumaConfig
impl Debug for NumaConfig
Auto Trait Implementations§
impl Freeze for NumaConfig
impl RefUnwindSafe for NumaConfig
impl Send for NumaConfig
impl Sync for NumaConfig
impl Unpin for NumaConfig
impl UnwindSafe for NumaConfig
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