pub enum Placement {
Auto {
max_partitions: Option<usize>,
},
Explicit(Vec<CpuSet>),
Unpinned {
partitions: usize,
},
}Expand description
How partitions map onto the machine.
Variants§
Auto
One partition per NUMA node in the affinity mask.
The partition count is the node count rounded down to a power of two (at least one); when that is fewer than the node count, adjacent nodes are merged into a partition rather than dropped, so every allowed CPU stays in play. Each partition takes as many threads as it has CPUs.
Fields
Explicit(Vec<CpuSet>)
One partition per listed CPU set, exactly as given.
Sets may overlap (the resolve logs a warning and proceeds), but each must be non-empty and a subset of the process’s affinity mask.
Unpinned
Partitions with no pinning at all, for tests and CI, each taking an even share of available_parallelism (at least one thread).
Trait Implementations§
impl Eq for Placement
impl StructuralPartialEq for Placement
Auto Trait Implementations§
impl Freeze for Placement
impl RefUnwindSafe for Placement
impl Send for Placement
impl Sync for Placement
impl Unpin for Placement
impl UnwindSafe for Placement
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
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
Checks if this value is equivalent to the given key. Read more
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