pub enum Controller {
Cpuset,
Cpu,
Memory,
Pids,
Io,
}Expand description
Cgroup v2 controllers that CgroupManager::setup can enable in
cgroup.subtree_control.
Each variant maps to a literal token the kernel parses in
cgroup_subtree_control_write. The enum is exhaustive over the
controllers the framework’s CgroupOps surface actually writes
to (cpuset, cpu, memory, pids, io); cgroup-core knobs
(cgroup.freeze, cgroup.procs) are not gated by any controller
and never appear here.
Callers pass a BTreeSet<Controller> to setup — sets compose
naturally across nested CgroupDef declarations and the deterministic
BTreeSet iteration order keeps the rendered subtree_control write
stable between runs.
Variants§
Cpuset
+cpuset — gates cpuset.cpus, cpuset.cpus.effective,
cpuset.mems, cpuset.mems.effective files on every child.
Cpu
+cpu — gates cpu.max, cpu.weight, cpu.weight.nice,
cpu.stat, cpu.pressure files on every child.
Memory
+memory — gates memory.max, memory.high, memory.low,
memory.min, memory.current, memory.swap.max,
memory.events, memory.stat, memory.pressure files.
Pids
+pids — gates pids.max, pids.current, pids.events files.
Io
+io — gates io.max, io.weight, io.bfq.weight,
io.stat, io.pressure files.
Implementations§
Trait Implementations§
Source§impl Clone for Controller
impl Clone for Controller
Source§fn clone(&self) -> Controller
fn clone(&self) -> Controller
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Controller
impl Debug for Controller
Source§impl Hash for Controller
impl Hash for Controller
Source§impl Ord for Controller
impl Ord for Controller
Source§fn cmp(&self, other: &Controller) -> Ordering
fn cmp(&self, other: &Controller) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for Controller
impl PartialEq for Controller
Source§impl PartialOrd for Controller
impl PartialOrd for Controller
impl Copy for Controller
impl Eq for Controller
impl StructuralPartialEq for Controller
Auto Trait Implementations§
impl Freeze for Controller
impl RefUnwindSafe for Controller
impl Send for Controller
impl Sync for Controller
impl Unpin for Controller
impl UnwindSafe for Controller
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more