#[repr(align(64))]pub struct NumaNodeState {
pub node_id: NumaNodeId,
pub active_threads: AtomicUsize,
pub affine_threads: AtomicUsize,
pub local_allocations: AtomicU64,
pub remote_allocations: AtomicU64,
pub migrations_in: AtomicU64,
pub migrations_out: AtomicU64,
pub perf_stats: CacheLinePadded<NumaNodePerfStats>,
}
Expand description
Per-NUMA node statistics and state.
Fields§
§node_id: NumaNodeId
NUMA node ID
active_threads: AtomicUsize
Number of threads currently running on this node
affine_threads: AtomicUsize
Number of threads with affinity to this node
local_allocations: AtomicU64
Memory allocation statistics
remote_allocations: AtomicU64
§migrations_in: AtomicU64
Load balancing statistics
migrations_out: AtomicU64
§perf_stats: CacheLinePadded<NumaNodePerfStats>
Performance counters
Implementations§
Source§impl NumaNodeState
impl NumaNodeState
pub fn new(node_id: NumaNodeId) -> Self
Sourcepub fn get_memory_locality(&self) -> f64
pub fn get_memory_locality(&self) -> f64
Get memory locality ratio.
Sourcepub fn record_migration_in(&self)
pub fn record_migration_in(&self)
Record a thread migration into this node.
Sourcepub fn record_migration_out(&self)
pub fn record_migration_out(&self)
Record a thread migration out of this node.
Sourcepub fn record_local_allocation(&self, size: usize)
pub fn record_local_allocation(&self, size: usize)
Record local memory allocation.
Sourcepub fn record_remote_allocation(&self, size: usize)
pub fn record_remote_allocation(&self, size: usize)
Record remote memory allocation.
Auto Trait Implementations§
impl !Freeze for NumaNodeState
impl RefUnwindSafe for NumaNodeState
impl Send for NumaNodeState
impl Sync for NumaNodeState
impl Unpin for NumaNodeState
impl UnwindSafe for NumaNodeState
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