Skip to contentSkip to conversation

mm-memcg-move-generation-assignment-and-comparison-together.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message May 10, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/memcg: move generation assignment and comparison together
has been removed from the -mm tree. Its filename was
mm-memcg-move-generation-assignment-and-comparison-together.patch

This patch was dropped because it was merged into mm-stable

------------------------------------------------------
From: Wei Yang <[email protected]>
Subject: mm/memcg: move generation assignment and comparison together

For each round-trip, we assign generation on first invocation and compare it on subsequent invocations.

Let's move them together to make it more self-explaining. Also this reduce a check on prev.

---

 mm/memcontrol.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
mm/memcontrol.c renamed from mm/memcontrol.c~mm-memcg-move-generation-assignment-and-comparison-together +7 -3
@@ -1021,7 +1021,13 @@ struct mem_cgroup *mem_cgroup_iter(struc
 		mz = root->nodeinfo[reclaim->pgdat->node_id];
 		iter = &mz->iter;
 
-		if (prev && reclaim->generation != iter->generation)
+		/*
+		 * On start, join the current reclaim iteration cycle.
+		 * Exit when a concurrent walker completes it.
+		 */
+		if (!prev)
+			reclaim->generation = iter->generation;
+		else if (reclaim->generation != iter->generation)
 			goto out_unlock;
 
 		while (1) {
@@ -1083,8 +1089,6 @@ struct mem_cgroup *mem_cgroup_iter(struc
 
 		if (!memcg)
 			iter->generation++;
-		else if (!prev)
-			reclaim->generation = iter->generation;
 	}
 
 out_unlock:

_

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

mm-vmscan-not-necessary-to-re-init-the-list-for-each-iteration.patch mm-vmscan-filter-empty-page_list-at-the-beginning.patch mm-vmscan-not-use-numa_no_node-as-indicator-of-page-on-different-node.patch