Struct cgroups_rs::cpuset::CpuSet[][src]

pub struct CpuSet {
    pub cpu_exclusive: bool,
    pub cpus: Vec<(u64, u64)>,
    pub effective_cpus: Vec<(u64, u64)>,
    pub effective_mems: Vec<(u64, u64)>,
    pub mem_exclusive: bool,
    pub mem_hardwall: bool,
    pub memory_migrate: bool,
    pub memory_pressure: u64,
    pub memory_pressure_enabled: Option<bool>,
    pub memory_spread_page: bool,
    pub memory_spread_slab: bool,
    pub mems: Vec<(u64, u64)>,
    pub sched_load_balance: bool,
    pub sched_relax_domain_level: u64,
}

The current state of the cpuset controller for this control group.

Fields

cpu_exclusive: bool

If true, no other control groups can share the CPUs listed in the cpus field.

cpus: Vec<(u64, u64)>

The list of CPUs the tasks of the control group can run on.

This is a vector of (start, end) tuples, where each tuple is a range of CPUs where the control group is allowed to run on. Both sides of the range are inclusive.

effective_cpus: Vec<(u64, u64)>

The list of CPUs that the tasks can effectively run on. This removes the list of CPUs that the parent (and all of its parents) cannot run on from the cpus field of this control group.

effective_mems: Vec<(u64, u64)>

The list of memory nodes that the tasks can effectively use. This removes the list of nodes that the parent (and all of its parents) cannot use from the mems field of this control group.

mem_exclusive: bool

If true, no other control groups can share the memory nodes listed in the mems field.

mem_hardwall: bool

If true, the control group is ‘hardwalled’. Kernel memory allocations (except for a few minor exceptions) are made from the memory nodes designated in the mems field.

memory_migrate: bool

If true, whenever mems is changed via set_mems(), the memory stored on the previous nodes are migrated to the new nodes selected by the new mems.

memory_pressure: u64

Running average of the memory pressured faced by the tasks in the control group.

memory_pressure_enabled: Option<bool>

This field is only at the root control group and controls whether the kernel will compute the memory pressure for control groups or not.

memory_spread_page: bool

If true, filesystem buffers are spread across evenly between the nodes specified in mems.

memory_spread_slab: bool

If true, kernel slab caches for file I/O are spread across evenly between the nodes specified in mems.

mems: Vec<(u64, u64)>

The list of memory nodes the tasks of the control group can use.

The format is the same as the cpus, effective_cpus and effective_mems fields.

sched_load_balance: bool

If true, the kernel will attempt to rebalance the load between the CPUs specified in the cpus field of this control group.

sched_relax_domain_level: u64

Represents how much work the kernel should do to rebalance this cpuset.

sched_load_balanceEffect
-1Use the system default value
0Only balance loads periodically
1Immediately balance the load across tasks on the same core
2Immediately balance the load across cores in the same CPU package
4Immediately balance the load across CPUs on the same node
5Immediately balance the load between CPUs even if the system is NUMA
6Immediately balance the load between all CPUs

Auto Trait Implementations

impl RefUnwindSafe for CpuSet

impl Send for CpuSet

impl Sync for CpuSet

impl Unpin for CpuSet

impl UnwindSafe for CpuSet

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.