pub struct NumaSlabPool { /* private fields */ }Expand description
Multi-node slab pool that routes allocations to NUMA-local slabs.
Implementations§
Source§impl NumaSlabPool
impl NumaSlabPool
Sourcepub fn from_manifest(
manifest: &ReactorPlacementManifest,
config: NumaSlabConfig,
) -> Self
pub fn from_manifest( manifest: &ReactorPlacementManifest, config: NumaSlabConfig, ) -> Self
Create a pool with one slab per NUMA node identified in the placement manifest.
Sourcepub const fn set_hugepage_status(&mut self, status: HugepageStatus)
pub const fn set_hugepage_status(&mut self, status: HugepageStatus)
Override hugepage status after querying the host.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Number of NUMA nodes in this pool.
Sourcepub fn allocate(
&mut self,
preferred_node: usize,
) -> Option<(NumaSlabHandle, Option<CrossNodeReason>)>
pub fn allocate( &mut self, preferred_node: usize, ) -> Option<(NumaSlabHandle, Option<CrossNodeReason>)>
Allocate from the preferred NUMA node, falling back to any node with capacity.
Returns (handle, cross_node_reason) where the reason is Some when
the allocation was served from a non-preferred node.
Sourcepub fn deallocate(&mut self, handle: &NumaSlabHandle) -> bool
pub fn deallocate(&mut self, handle: &NumaSlabHandle) -> bool
Deallocate a previously allocated handle.
Returns true if deallocation succeeded.
Sourcepub fn telemetry(&self) -> NumaSlabTelemetry
pub fn telemetry(&self) -> NumaSlabTelemetry
Snapshot telemetry for this pool.
Trait Implementations§
Source§impl Clone for NumaSlabPool
impl Clone for NumaSlabPool
Source§fn clone(&self) -> NumaSlabPool
fn clone(&self) -> NumaSlabPool
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 moreAuto Trait Implementations§
impl Freeze for NumaSlabPool
impl RefUnwindSafe for NumaSlabPool
impl Send for NumaSlabPool
impl Sync for NumaSlabPool
impl Unpin for NumaSlabPool
impl UnsafeUnpin for NumaSlabPool
impl UnwindSafe for NumaSlabPool
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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