Struct dpdk_unix::android_linux::mounts::HugePageMountSettings [−][src]
pub struct HugePageMountSettings { pub mount_point: PathBuf, pub user_id: uid_t, pub group_id: gid_t, pub mode: mode_t, pub maximum_value_of_memory_in_bytes: Option<u64>, pub minimum_value_of_memory_in_bytes: Option<u64>, pub maximum_number_of_inodes: Option<u64>, pub mount_flags: MountFlags, }
Settings for mounting a hugetlbfs file system.
Fields
mount_point: PathBuf
Mount point for huge pages file system.
There is no real standard; we default to /dev/hugepages
, this being the default used by the Ubuntu official deb package and similar in spirit to /dev/shm
. Other options include:-
- DPDK
dpdk-setup.sh
uses/mnt/huge
- DPDK docs variously also use
/mnt/hugepages
and/mnt/hugetlbfs
. - RHEL, Debian tutorials and examples use
/hugetlbfs
. - Ubuntu official deb package uses
/dev/hugepages
(https://gerrit.fd.io/r/gitweb?p=deb_dpdk.git;a=blob;f=debian/dpdk-init;h=86eda2cb9c4e802aa07603761a82b312f4bb7fa2;hb=HEAD). - At least one admin on a forum uses
/mnt/huge_1gb
.
user_id: uid_t
User id (uid
), eg 0
.
group_id: gid_t
Group id (gid
), eg 0
.
mode: mode_t
Permissions mode.
Debian uses 1770 for mode.
maximum_value_of_memory_in_bytes: Option<u64>
eg None
.
minimum_value_of_memory_in_bytes: Option<u64>
eg None
.
maximum_number_of_inodes: Option<u64>
eg None
.
mount_flags: MountFlags
eg MountFlags::DoNotUpdateAccessTimes | MountFlags::DoNotAllowProgramsToBeExecuted | MountFlags::DoNotHonourSetUidAndSetGidPermissions
.
Methods
impl HugePageMountSettings
[src]
impl HugePageMountSettings
pub fn mount(&self, sys_path: &SysPath) -> bool
[src]
pub fn mount(&self, sys_path: &SysPath) -> bool
Creates the required mount point then mounts hugetlbfs
.
Panics if mount already exists and is not a directory.
Returns true
if the mount point was created or false
if it already existed.
Trait Implementations
impl Debug for HugePageMountSettings
[src]
impl Debug for HugePageMountSettings
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 Clone for HugePageMountSettings
[src]
impl Clone for HugePageMountSettings
fn clone(&self) -> HugePageMountSettings
[src]
fn clone(&self) -> HugePageMountSettings
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 HugePageMountSettings
[src]
impl PartialEq for HugePageMountSettings
fn eq(&self, other: &HugePageMountSettings) -> bool
[src]
fn eq(&self, other: &HugePageMountSettings) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &HugePageMountSettings) -> bool
[src]
fn ne(&self, other: &HugePageMountSettings) -> bool
This method tests for !=
.
impl Eq for HugePageMountSettings
[src]
impl Eq for HugePageMountSettings
impl PartialOrd for HugePageMountSettings
[src]
impl PartialOrd for HugePageMountSettings
fn partial_cmp(&self, other: &HugePageMountSettings) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &HugePageMountSettings) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &HugePageMountSettings) -> bool
[src]
fn lt(&self, other: &HugePageMountSettings) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &HugePageMountSettings) -> bool
[src]
fn le(&self, other: &HugePageMountSettings) -> 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: &HugePageMountSettings) -> bool
[src]
fn gt(&self, other: &HugePageMountSettings) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &HugePageMountSettings) -> bool
[src]
fn ge(&self, other: &HugePageMountSettings) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for HugePageMountSettings
[src]
impl Ord for HugePageMountSettings
fn cmp(&self, other: &HugePageMountSettings) -> Ordering
[src]
fn cmp(&self, other: &HugePageMountSettings) -> 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 HugePageMountSettings
[src]
impl Hash for HugePageMountSettings
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Default for HugePageMountSettings
[src]
impl Default for HugePageMountSettings
Auto Trait Implementations
impl Send for HugePageMountSettings
impl Send for HugePageMountSettings
impl Sync for HugePageMountSettings
impl Sync for HugePageMountSettings