pub struct CpuSet {Show 14 fields
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,
}
Expand description
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_balance | Effect |
---|---|
-1 | Use the system default value |
0 | Only balance loads periodically |
1 | Immediately balance the load across tasks on the same core |
2 | Immediately balance the load across cores in the same CPU package |
4 | Immediately balance the load across CPUs on the same node |
5 | Immediately balance the load between CPUs even if the system is NUMA |
6 | Immediately balance the load between all CPUs |