[−][src]Enum context_allocator::memory_sources::mmap::numa::NumaAllocationPolicy
Defaults to Default
.
Ignored on operating systems other than Android and Linux.
Variants
Default
MPOL_DEFAULT
.
This mode requests that any non-default policy be removed, restoring default behavior.
When applied to a range of memory this means to use the thread memory policy, which may have been set with the syscall set_mempolicy
.
If the mode of the thread memory policy is also NumaNodePolicy::Default
, then the system-wide default policy will be used.
The system-wide default policy allocates pages on the node of the CPU that triggers the allocation.
Preferred(NumaNodeBitSet)
MPOL_PREFERRED
.
This mode sets the preferred node for allocation.
The kernel will try to allocate pages from this node first and fall back to other nodes if the preferred node is low on free memory.
The first node in the bit set will be selected as the preferred node. If the NUMA node bit set is empty, then the memory is allocated on the node of the CPU that triggered the allocation.
Bind(NumaNodeBitSet)
MPOL_BIND
.
This mode specifies a strict policy that restricts memory allocation to the nodes specified in nodemask.
Page allocations will come from the node in the NUMA node node bit set with sufficient free memory that is closest to the node where the allocation takes place. Pages will not be allocated from any node not specified in the NUMA node node bit set.
Interleave(NumaNodeBitSet)
MPOL_INTERLEAVE
.
This mode specifies that page allocations be interleaved across the set of nodes specified in the NUMA node bit set.
This optimizes for bandwidth instead of latency by spreading out pages and memory accesses to those pages across multiple nodes. To be effective the memory area should be fairly large, at least 1 MB or bigger with a fairly uniform access pattern. Accesses to a single page of the area will still be limited to the memory bandwidth of a single node.
Local
MPOL_LOCAL
.
This mode specifies "local allocation"; the memory is allocated on the node of the CPU that triggered the allocation (the "local node").
If the "local node" is low on free memory, the kernel will try to allocate memory from other nodes. The kernel will allocate memory from the "local node" whenever memory for this node is available. If the "local node" is not allowed by the thread's current cpuset context, the kernel will try to allocate memory from other nodes. The kernel will allocate memory from the "local node" whenever it becomes allowed by the thread's current cpuset context.
Since Linux 3.8.
Trait Implementations
impl Eq for NumaAllocationPolicy
[src]
impl Copy for NumaAllocationPolicy
[src]
impl PartialOrd<NumaAllocationPolicy> for NumaAllocationPolicy
[src]
fn partial_cmp(&self, other: &NumaAllocationPolicy) -> Option<Ordering>
[src]
fn lt(&self, other: &NumaAllocationPolicy) -> bool
[src]
fn le(&self, other: &NumaAllocationPolicy) -> bool
[src]
fn gt(&self, other: &NumaAllocationPolicy) -> bool
[src]
fn ge(&self, other: &NumaAllocationPolicy) -> bool
[src]
impl PartialEq<NumaAllocationPolicy> for NumaAllocationPolicy
[src]
fn eq(&self, other: &NumaAllocationPolicy) -> bool
[src]
fn ne(&self, other: &NumaAllocationPolicy) -> bool
[src]
impl Clone for NumaAllocationPolicy
[src]
fn clone(&self) -> NumaAllocationPolicy
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for NumaAllocationPolicy
[src]
impl Ord for NumaAllocationPolicy
[src]
fn cmp(&self, other: &NumaAllocationPolicy) -> Ordering
[src]
default fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
default fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
default fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl Debug for NumaAllocationPolicy
[src]
impl Hash for NumaAllocationPolicy
[src]
Auto Trait Implementations
impl Send for NumaAllocationPolicy
impl Sync for NumaAllocationPolicy
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,