Skip to contentSkip to conversation

docs: cgroup-v1: Document the cpuset_v2_mode mount option

PATCH Superseded Waiman Long 2 participants 2 messages Mar 28, 2020

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Waiman Long

author maintainer
#0 lore raw

PATCH 1/1 docs: cgroup-v1: Document the cpuset_v2_mode mount option

The cpuset in cgroup v1 accepts a special "cpuset_v2_mode" mount option that make cpuset.cpus and cpuset.mems behave more like those in cgroup v2. Document it to make other people more aware of this feature that can be useful in some circumstances.

---
 Documentation/admin-guide/cgroup-v1/cpusets.rst | 11 +++++++++++
 1 file changed, 11 insertions(+)
Documentation/admin-guide/cgroup-v1/cpusets.rst +11 -0
index 86a6ae995d54..7ade3abd342a 100644
@@ -223,6 +223,17 @@ cpu_online_mask using a CPU hotplug notifier, and the mems file
 automatically tracks the value of node_states[N_MEMORY]--i.e.,
 nodes with memory--using the cpuset_track_online_nodes() hook.
 
+The cpuset.effective_cpus and cpuset.effective_mems files are
+normally read-only copies of cpuset.cpus and cpuset.mems files
+respectively.  If the cpuset cgroup filesystem is mounted with the
+special "cpuset_v2_mode" option, the behavior of these files will become
+similar to the corresponding files in cpuset v2.  In other words, hotplug
+events will not change cpuset.cpus and cpuset.mems.  Those events will
+only affect cpuset.effective_cpus and cpuset.effective_mems which show
+the actual cpus and memory nodes that are currently used by this cpuset.
+See Documentation/admin-guide/cgroup-v2.rst for more information about
+cpuset v2 behavior.
+
 
 1.4 What are exclusive cpusets ?
 --------------------------------
Signature · 1 line
2.18.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Waiman Long

The cpuset in cgroup v1 accepts a special "cpuset_v2_mode" mount option that make cpuset.cpus and cpuset.mems behave more like those in cgroup v2. Document it to make other people more aware of this feature that can be useful in some circumstances.

thanks,

- Joel

Quoted 29 lines
---
 Documentation/admin-guide/cgroup-v1/cpusets.rst | 11 +++++++++++
 1 file changed, 11 insertions(+)
Documentation/admin-guide/cgroup-v1/cpusets.rst +11 -0
index 86a6ae995d54..7ade3abd342a 100644
@@ -223,6 +223,17 @@ cpu_online_mask using a CPU hotplug notifier, and the mems file
 automatically tracks the value of node_states[N_MEMORY]--i.e.,
 nodes with memory--using the cpuset_track_online_nodes() hook.
 
+The cpuset.effective_cpus and cpuset.effective_mems files are
+normally read-only copies of cpuset.cpus and cpuset.mems files
+respectively.  If the cpuset cgroup filesystem is mounted with the
+special "cpuset_v2_mode" option, the behavior of these files will become
+similar to the corresponding files in cpuset v2.  In other words, hotplug
+events will not change cpuset.cpus and cpuset.mems.  Those events will
+only affect cpuset.effective_cpus and cpuset.effective_mems which show
+the actual cpus and memory nodes that are currently used by this cpuset.
+See Documentation/admin-guide/cgroup-v2.rst for more information about
+cpuset v2 behavior.
+
 
 1.4 What are exclusive cpusets ?
 --------------------------------
Signature · 1 line
2.18.1