Enum dpdk_unix::HugePageSize [−][src]
#[repr(u64)]pub enum HugePageSize { _1MB, _2MB, _4MB, _16MB, _256MB, _512MB, _1GB, _2GB, _16GB, }
Commonly supported huge page sizes for modern popular CPU architectures (x86, ARM, PowerPC).
See also https://en.wikipedia.org/wiki/Page_(computer_memory)#Huge_pages.
repr(u64)
values are in KiloBytes.
Variants
_1MB
1MB.
_2MB
2MB.
_4MB
4MB.
_16MB
16MB.
_256MB
256MB.
_512MB
512MB.
aarch64 alternative.
_1GB
1GB.
_2GB
2GB.
_16GB
16GB.
Methods
impl HugePageSize
[src]
impl HugePageSize
pub const PotentiallySupportedHugePageSizesLargestFirst: [HugePageSize; 9]
PotentiallySupportedHugePageSizesLargestFirst: [HugePageSize; 9] = [HugePageSize::_16GB, HugePageSize::_2GB, HugePageSize::_1GB, HugePageSize::_512MB, HugePageSize::_256MB, HugePageSize::_16MB, HugePageSize::_4MB, HugePageSize::_2MB, HugePageSize::_1MB]
Potentially supported huge page sizes.
pub fn size_in_mega_bytes(self) -> u64
[src]
pub fn size_in_mega_bytes(self) -> u64
Size in mega bytes.
pub fn size_in_kilo_bytes(self) -> u64
[src]
pub fn size_in_kilo_bytes(self) -> u64
Size in kilo bytes.
pub fn size_in_bytes(self) -> u64
[src]
pub fn size_in_bytes(self) -> u64
Size in bytes.
pub fn calculate_number_of_huge_pages(
&self,
desired_number_of_kilo_bytes: u64
) -> u64
[src]
pub fn calculate_number_of_huge_pages(
&self,
desired_number_of_kilo_bytes: u64
) -> u64
Calculate number of huge pages.
pub fn from_proc_mem_info_value(value: u64) -> Option<Self>
[src]
pub fn from_proc_mem_info_value(value: u64) -> Option<Self>
Converts a value from Linux's /proc/mem
pseudo-file into a HugePageSize
.
pub fn to_str(&self) -> &'static str
[src]
pub fn to_str(&self) -> &'static str
String description including unit.
pub fn largest_supported_huge_page_size(sys_path: &SysPath) -> Self
[src]
pub fn largest_supported_huge_page_size(sys_path: &SysPath) -> Self
Supported huge page sizes, sorted smallest to largest.
pub fn supported_huge_page_sizes(sys_path: &SysPath) -> BTreeSet<Self>
[src]
pub fn supported_huge_page_sizes(sys_path: &SysPath) -> BTreeSet<Self>
Supported huge page sizes, sorted smallest to largest.
pub fn unreserve_global_huge_pages(self, sys_path: &SysPath) -> Result<()>
[src]
pub fn unreserve_global_huge_pages(self, sys_path: &SysPath) -> Result<()>
Try to unreserve (clear reservations of) global huge pages.
Will only work as root.
pub fn reserve_global_huge_pages(
self,
sys_path: &SysPath,
number_to_try_to_reserve: u64
) -> Result<()>
[src]
pub fn reserve_global_huge_pages(
self,
sys_path: &SysPath,
number_to_try_to_reserve: u64
) -> Result<()>
Try to reserve global huge pages.
Will only work as root.
pub fn number_of_global_huge_pages(self, sys_path: &SysPath) -> Result<u64>
[src]
pub fn number_of_global_huge_pages(self, sys_path: &SysPath) -> Result<u64>
Read number of global huge pages of self
size.
pub fn number_of_free_global_huge_pages(self, sys_path: &SysPath) -> Result<u64>
[src]
pub fn number_of_free_global_huge_pages(self, sys_path: &SysPath) -> Result<u64>
Read number of free global huge pages of self
size.
pub fn number_of_surplus_global_huge_pages(
self,
sys_path: &SysPath
) -> Result<u64>
[src]
pub fn number_of_surplus_global_huge_pages(
self,
sys_path: &SysPath
) -> Result<u64>
Read number of surplus global huge pages of self
size.
pub fn number_of_reserved_global_huge_pages(
self,
sys_path: &SysPath
) -> Result<u64>
[src]
pub fn number_of_reserved_global_huge_pages(
self,
sys_path: &SysPath
) -> Result<u64>
Read number of reserved global huge pages of self
size.
pub fn number_of_memory_policy_global_huge_pages(
self,
sys_path: &SysPath
) -> Result<u64>
[src]
pub fn number_of_memory_policy_global_huge_pages(
self,
sys_path: &SysPath
) -> Result<u64>
Read number of memory policy global huge pages of self
size.
pub fn number_of_overcommit_global_huge_pages(
self,
sys_path: &SysPath
) -> Result<u64>
[src]
pub fn number_of_overcommit_global_huge_pages(
self,
sys_path: &SysPath
) -> Result<u64>
Read number of overcommit global huge pages of self
size.
pub fn unreserve_numa_huge_pages(
self,
sys_path: &SysPath,
numa_node: u8
) -> Result<()>
[src]
pub fn unreserve_numa_huge_pages(
self,
sys_path: &SysPath,
numa_node: u8
) -> Result<()>
Try to unreserve (clear reservations of) NUMA huge pages.
Will only work as root.
pub fn reserve_numa_huge_pages(
self,
sys_path: &SysPath,
numa_node: u8,
number_to_try_to_reserve: u64
) -> Result<()>
[src]
pub fn reserve_numa_huge_pages(
self,
sys_path: &SysPath,
numa_node: u8,
number_to_try_to_reserve: u64
) -> Result<()>
Try to reserve NUMA huge pages.
Will only work as root.
pub fn number_of_numa_huge_pages(
self,
sys_path: &SysPath,
numa_node: u8
) -> Result<u64>
[src]
pub fn number_of_numa_huge_pages(
self,
sys_path: &SysPath,
numa_node: u8
) -> Result<u64>
Read number of NUMA huge pages of self
size.
This will fail if this is not a NUMA-based machine or the node is not present.
pub fn number_of_free_numa_huge_pages(
self,
sys_path: &SysPath,
numa_node: u8
) -> Result<u64>
[src]
pub fn number_of_free_numa_huge_pages(
self,
sys_path: &SysPath,
numa_node: u8
) -> Result<u64>
Read number of free NUMA node huge pages of self
size.
This will fail if this is not a NUMA-based machine or the node is not present.
pub fn number_of_surplus_numa_huge_pages(
self,
sys_path: &SysPath,
numa_node: u8
) -> Result<u64>
[src]
pub fn number_of_surplus_numa_huge_pages(
self,
sys_path: &SysPath,
numa_node: u8
) -> Result<u64>
Read number of surplus NUMA huge pages of self
size.
This will fail if this is not a NUMA-based machine or the node is not present.
Trait Implementations
impl Debug for HugePageSize
[src]
impl Debug for HugePageSize
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for HugePageSize
[src]
impl Copy for HugePageSize
impl Clone for HugePageSize
[src]
impl Clone for HugePageSize
fn clone(&self) -> HugePageSize
[src]
fn clone(&self) -> HugePageSize
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for HugePageSize
[src]
impl PartialEq for HugePageSize
fn eq(&self, other: &HugePageSize) -> bool
[src]
fn eq(&self, other: &HugePageSize) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for HugePageSize
[src]
impl Eq for HugePageSize
impl PartialOrd for HugePageSize
[src]
impl PartialOrd for HugePageSize
fn partial_cmp(&self, other: &HugePageSize) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &HugePageSize) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for HugePageSize
[src]
impl Ord for HugePageSize
fn cmp(&self, other: &HugePageSize) -> Ordering
[src]
fn cmp(&self, other: &HugePageSize) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for HugePageSize
[src]
impl Hash for HugePageSize
Auto Trait Implementations
impl Send for HugePageSize
impl Send for HugePageSize
impl Sync for HugePageSize
impl Sync for HugePageSize