Re: [PATCH v9 3/7] cgroup/cpuset: Refining features and constraints of a partition

From
Michal Koutný <mkoutny@suse.com>
Date
2021-12-15 14:49:50
Also in
linux-doc, linux-kselftest, lkml
Reply to
Waiman Long, 2021-12-05
On Sun, Dec 05, 2021 at 01:32:16PM -0500, Waiman Long [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -1455,34 +1450,16 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp)
 			switch (parent->partition_root_state) {
[...]
-
 			case PRS_ENABLED:
-				if (update_parent_subparts_cpumask(cp, partcmd_update, NULL, tmp))
-					update_tasks_cpumask(parent);
+				update_parent = true;
[...]
+		if (update_parent) {
+			if (update_parent_subparts_cpumask(cp, partcmd_update, NULL, tmp))
+				update_tasks_cpumask(parent);
+			/*
+			 * The cpuset partition_root_state may be changed
+			 * to PRS_ERROR. Capture it.
+			 */
+			new_prs = cp->partition_root_state;
+		}
IIUC, this ensures that when a parent becomes partition root again, this
would propagate downwards to invalidated children. 

However, the documentation says:
quoted hunk ↗ jump to hunk
+       Changing a partition root (valid or invalid) to "member" is
+       always allowed.  If there are child partition roots underneath
+       it, they will become invalid and unrecoverable.  So care must
+       be taken to double check for this condition before disabling
+       a partition root.
I.e. it suggests a child can be trapped in the unrecoverable state (i.e.
not fixable by writing into cpuset.cpus.partition).
But this does not happen, right?

Michal
Thread (30 messages) 30 messages, 4 authors, last reply 2022-01-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help