Struct cgroups_rs::memory::MemController [−][src]
pub struct MemController { /* fields omitted */ }
Expand description
A controller that allows controlling the memory
subsystem of a Cgroup.
In essence, using the memory controller, the user can gather statistics about the memory usage of the tasks in the control group. Additonally, one can also set powerful limits on their memory usage.
Implementations
Contructs a new MemController
with root
serving as the root of the control group.
Gathers overall statistics (and the current state of) about the memory usage of the control group’s tasks.
See the individual fields for more explanation, and as always, remember to consult the kernel Documentation and/or sources.
Gathers information about the kernel memory usage of the control group’s tasks.
Gathers information about the control group’s kernel memory usage where said memory is TCP-related.
Gathers information about the memory usage of the control group including the swap usage (if any).
Reset the fail counter
Reset the kernel memory fail counter
Reset the TCP related fail counter
Reset the memory+swap fail counter
Reset the max memory usage recorded
Set the memory usage limit of the control group, in bytes.
Set the kernel memory limit of the control group, in bytes.
Set the memory+swap limit of the control group, in bytes.
Set how much kernel memory can be used for TCP-related buffers by the control group.
Set the soft limit of the control group, in bytes.
This limit is enforced when the system is nearing OOM conditions. Contrast this with the hard limit, which is always enforced.
Set how likely the kernel is to swap out parts of the address space used by the control group.
Note that a value of zero does not imply that the process will not be swapped out.
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for MemController
impl Send for MemController
impl Sync for MemController
impl Unpin for MemController
impl UnwindSafe for MemController
Blanket Implementations
Mutably borrows from an owned value. Read more
Apply a set of resources to the Controller, invoking its internal functions to pass the kernel the information.
Attach a task to this controller by thread group id.