Skip to contentSkip to conversation

cgroup-use-nodes_and-output-where-appropriate.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jan 27

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: cgroup: use nodes_and() output where appropriate
has been removed from the -mm tree. Its filename was
cgroup-use-nodes_and-output-where-appropriate.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Yury Norov <[email protected]>
Subject: cgroup: use nodes_and() output where appropriate
Date: Wed, 14 Jan 2026 12:22:15 -0500

Now that nodes_and() returns true if the result nodemask is not empty, drop useless nodes_intersects() in guarantee_online_mems() and nodes_empty() in update_nodemasks_hier(), which both are O(N).

Cc Alistair Popple <[email protected]>
Cc Byungchul Park <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc "Huang, Ying" <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Liam Howlett <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Mathew Brost <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Michal Koutný <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Rakie Kim <[email protected]>
Cc Rasmus Villemoes <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Waiman Long <[email protected]>
Cc Yury Norov (NVIDIA) <[email protected]>
Cc Zi Yan <[email protected]>

---

 kernel/cgroup/cpuset.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
kernel/cgroup/cpuset.c renamed from kernel/cgroup/cpuset.c~cgroup-use-nodes_and-output-where-appropriate +3 -4
@@ -453,9 +453,8 @@ static void guarantee_active_cpus(struct
  */
 static void guarantee_online_mems(struct cpuset *cs, nodemask_t *pmask)
 {
-	while (!nodes_intersects(cs->effective_mems, node_states[N_MEMORY]))
+	while (!nodes_and(*pmask, cs->effective_mems, node_states[N_MEMORY]))
 		cs = parent_cs(cs);
-	nodes_and(*pmask, cs->effective_mems, node_states[N_MEMORY]);
 }
 
 /**
@@ -2859,13 +2858,13 @@ static void update_nodemasks_hier(struct
 	cpuset_for_each_descendant_pre(cp, pos_css, cs) {
 		struct cpuset *parent = parent_cs(cp);
 
-		nodes_and(*new_mems, cp->mems_allowed, parent->effective_mems);
+		bool has_mems = nodes_and(*new_mems, cp->mems_allowed, parent->effective_mems);
 
 		/*
 		 * If it becomes empty, inherit the effective mask of the
 		 * parent, which is guaranteed to have some MEMs.
 		 */
-		if (is_in_v2_mode() && nodes_empty(*new_mems))
+		if (is_in_v2_mode() && !has_mems)
 			*new_mems = parent->effective_mems;
 
 		/* Skip the whole subtree if the nodemask remains the same. */

_

Patches currently in -mm which might be from [email protected] are

kernelh-drop-stack_magic-macro.patch moduleparam-include-required-headers-explicitly.patch kernelh-move-verify_octal_permissions-to-sysfsh.patch kernelh-include-linux-instruction_pointerh-explicitly.patch tracing-move-tracing-declarations-from-kernelh-to-a-dedicated-header.patch