Struct cgroups_rs::hugetlb::HugeTlbController [−][src]
A controller that allows controlling the hugetlb
subsystem of a Cgroup.
In essence, using this controller it is possible to limit the use of hugepages in the tasks of the control group.
Implementations
impl HugeTlbController
[src]
pub fn new(root: PathBuf, v2: bool) -> Self
[src]
Constructs a new HugeTlbController
with root
serving as the root of the control group.
pub fn size_supported(&self, hugetlb_size: &str) -> bool
[src]
Whether the system supports hugetlb_size
hugepages.
pub fn get_sizes(&self) -> Vec<String>
[src]
pub fn failcnt(&self, hugetlb_size: &str) -> Result<u64>
[src]
Check how many times has the limit of hugetlb_size
hugepages been hit.
pub fn limit_in_bytes(&self, hugetlb_size: &str) -> Result<u64>
[src]
Get the limit (in bytes) of how much memory can be backed by hugepages of a certain size
(hugetlb_size
).
pub fn usage_in_bytes(&self, hugetlb_size: &str) -> Result<u64>
[src]
Get the current usage of memory that is backed by hugepages of a certain size
(hugetlb_size
).
pub fn max_usage_in_bytes(&self, hugetlb_size: &str) -> Result<u64>
[src]
Get the maximum observed usage of memory that is backed by hugepages of a certain size
(hugetlb_size
).
pub fn set_limit_in_bytes(&self, hugetlb_size: &str, limit: u64) -> Result<()>
[src]
Set the limit (in bytes) of how much memory can be backed by hugepages of a certain size
(hugetlb_size
).
Trait Implementations
impl Clone for HugeTlbController
[src]
fn clone(&self) -> HugeTlbController
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for HugeTlbController
[src]
impl<'a> From<&'a Subsystem> for &'a HugeTlbController
[src]
fn from(sub: &'a Subsystem) -> &'a HugeTlbController
[src]
Auto Trait Implementations
impl RefUnwindSafe for HugeTlbController
impl Send for HugeTlbController
impl Sync for HugeTlbController
impl Unpin for HugeTlbController
impl UnwindSafe for HugeTlbController
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Controller for T where
T: ControllerInternal,
[src]
T: ControllerInternal,
pub fn control_type(&Self) -> Controllers
[src]
pub fn path(&Self) -> &Path
[src]
pub fn apply(&Self, &Resources) -> Result<(), Error>
[src]
Apply a set of resources to the Controller, invoking its internal functions to pass the kernel the information.
pub fn create(&Self)
[src]
Create this controller
pub fn set_notify_on_release(&Self, bool) -> Result<(), Error>
[src]
Set notify_on_release
pub fn set_release_agent(&Self, &str) -> Result<(), Error>
[src]
Set release_agent
pub fn exists(&Self) -> bool
[src]
Does this controller already exist?
pub fn delete(&Self) -> Result<(), Error>
[src]
Delete the controller.
pub fn add_task(&Self, &CgroupPid) -> Result<(), Error>
[src]
Attach a task to this controller.
pub fn add_task_by_tgid(&Self, &CgroupPid) -> Result<(), Error>
[src]
Attach a task to this controller by thread group id.
pub fn tasks(&Self) -> Vec<CgroupPid, Global>
[src]
Get the list of tasks that this controller has.
pub fn v2(&Self) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,