Skip to contentSkip to conversation

docs: cgroup: Clarify cpuset CPU isolation

PATCH New Guopeng Zhang 1 participant 3 messages Nov 26

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover docs: cgroup: Clarify cpuset CPU isolation

From: Guopeng Zhang <[email protected]>

The cpuset documentation has an incorrect description of boot-time domain isolation and does not describe the housekeeping CPU requirement for isolated partitions when full dynticks is enabled.

Patch 1 corrects the cgroup v1 description of isolcpus= and removes a reference to the nonexistent cpuset.isolcpus file. Patch 2 documents which CPUs must remain available for housekeeping in cgroup v2.

Guopeng Zhang (2):
docs: cgroup-v1: Fix the isolcpus description
docs: cgroup-v2: Document the housekeeping CPU requirement

 Documentation/admin-guide/cgroup-v1/cpusets.rst | 15 ++++++++-------
 Documentation/admin-guide/cgroup-v2.rst         |  7 +++++++
 2 files changed, 15 insertions(+), 7 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/2 docs: cgroup-v1: Fix the isolcpus description

From: Guopeng Zhang <[email protected]>

The sched_load_balance section incorrectly includes CPUs isolated with the domain flag of isolcpus= in the default scheduling domain. It also refers to a nonexistent cpuset.isolcpus file.

Correct both passages and clarify that domain is the default flag of isolcpus=. The nohz and managed_irq flags do not by themselves disable scheduler load balancing.

---
 Documentation/admin-guide/cgroup-v1/cpusets.rst | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
Documentation/admin-guide/cgroup-v1/cpusets.rst +8 -7
index fb3fb6fa88cb..d47f96979988 100644
@@ -398,10 +398,11 @@ Put simply, it costs less to balance between two smaller sched domains
 than one big one, but doing so means that overloads in one of the
 two domains won't be load balanced to the other one.
 
-By default, there is one sched domain covering all CPUs, including those
-marked isolated using the kernel boot time "isolcpus=" argument. However,
-the isolated CPUs will not participate in load balancing, and will not
-have tasks running on them unless explicitly assigned.
+By default, scheduler load balancing includes all online CPUs except
+those isolated with the "domain" flag of the "isolcpus=" boot option.
+This flag is implied if no flags are specified. The "nohz" and
+"managed_irq" flags do not by themselves disable scheduler load
+balancing.
 
 This default load balancing across all CPUs is not well suited for
 the following two situations:
@@ -474,9 +475,9 @@ such partially load balanced cpusets, as they may be artificially
 constrained to some subset of the CPUs allowed to them, for lack of
 load balancing to the other CPUs.
 
-CPUs in "cpuset.isolcpus" were excluded from load balancing by the
-isolcpus= kernel boot option, and will never be load balanced regardless
-of the value of "cpuset.sched_load_balance" in any cpuset.
+CPUs isolated with the "domain" flag of the "isolcpus=" boot option
+remain excluded from scheduler load balancing regardless of the value
+of "cpuset.sched_load_balance" in any cpuset.
 
 1.7.1 sched_load_balance implementation details.
 ------------------------------------------------
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/2 docs: cgroup-v2: Document the housekeeping CPU requirement

In reply to Guopeng Zhang

From: Guopeng Zhang <[email protected]>

The cpuset.cpus.partition documentation does not describe the housekeeping CPU requirement for isolated partitions.

When full dynticks is enabled, changes to the isolated partition configuration must leave at least one active CPU available for housekeeping.

---
 Documentation/admin-guide/cgroup-v2.rst | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/admin-guide/cgroup-v2.rst +7 -0
index 2f792ff29425..36199da5c842 100644
@@ -2838,6 +2838,13 @@ Cpuset Interface Files
 	kernel boot command line option.  If those CPUs are to be put
 	into a partition, they have to be used in an isolated partition.
 
+	In addition to the CPU 0 restriction above, when full dynticks is
+	enabled with "nohz_full=" or the "nohz" flag of "isolcpus=", the
+	isolated partition configuration must leave at least one active CPU
+	available for housekeeping. This CPU must be outside the full-dynticks
+	CPU set, the CPUs isolated at boot using the "domain" flag of
+	"isolcpus=", and the CPUs in all isolated partitions.
+
 
 Device controller
 -----------------
Signature · 1 line
2.43.0