[−][src]Enum dpdk_unix::memory_information::HugePageSize
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]
pub const PotentiallySupportedHugePageSizesLargestFirst: [HugePageSize; 9]
[src]
Potentially supported huge page sizes.
pub fn size_in_mega_bytes(self) -> u64
[src]
Size in mega bytes.
pub fn size_in_kilo_bytes(self) -> u64
[src]
Size in kilo bytes.
pub fn size_in_bytes(self) -> u64
[src]
Size in bytes.
pub fn calculate_number_of_huge_pages(
&self,
desired_number_of_kilo_bytes: u64
) -> u64
[src]
&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]
Converts a value from Linux's /proc/mem
pseudo-file into a HugePageSize
.
pub fn to_str(&self) -> &'static str
[src]
String description including unit.
pub fn to_bytes(&self) -> &'static [u8]
[src]
String description including unit.
pub fn largest_supported_huge_page_size(sys_path: &SysPath) -> Self
[src]
Supported huge page sizes, sorted smallest to largest.
pub fn supported_huge_page_sizes(sys_path: &SysPath) -> BTreeSet<Self>
[src]
Supported huge page sizes, sorted smallest to largest.
pub fn unreserve_global_huge_pages(self, sys_path: &SysPath) -> Result<()>
[src]
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]
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]
Read number of global huge pages of self
size.
pub fn number_of_free_global_huge_pages(self, sys_path: &SysPath) -> Result<u64>
[src]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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 Eq for HugePageSize
[src]
impl Clone for HugePageSize
[src]
fn clone(&self) -> HugePageSize
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for HugePageSize
[src]
impl PartialOrd<HugePageSize> for HugePageSize
[src]
fn partial_cmp(&self, other: &HugePageSize) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<HugePageSize> for HugePageSize
[src]
fn eq(&self, other: &HugePageSize) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Ord for HugePageSize
[src]
fn cmp(&self, other: &HugePageSize) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Hash for HugePageSize
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for HugePageSize
[src]
Auto Trait Implementations
impl Send for HugePageSize
impl Sync for HugePageSize
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)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, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,