mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [to-be-updated] mm-memcg-__mem_cgroup_remove_exceeded-could-handle-a-on-tree-mz-properly.patch removed from -mm tree
@ 2022-03-14 21:17 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-03-14 21:17 UTC (permalink / raw)
  To: mm-commits, shakeelb, roman.gushchin, mhocko, hannes,
	richard.weiyang, akpm


The patch titled
     Subject: mm/memcg: __mem_cgroup_remove_exceeded could handle a !on-tree mz properly
has been removed from the -mm tree.  Its filename was
     mm-memcg-__mem_cgroup_remove_exceeded-could-handle-a-on-tree-mz-properly.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Wei Yang <richard.weiyang@gmail.com>
Subject: mm/memcg: __mem_cgroup_remove_exceeded could handle a !on-tree mz properly

There is no tree operation if mz is not on-tree.

Let's remove the extra check.

Link: https://lkml.kernel.org/r/20220312071623.19050-2-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/memcontrol.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- a/mm/memcontrol.c~mm-memcg-__mem_cgroup_remove_exceeded-could-handle-a-on-tree-mz-properly
+++ a/mm/memcontrol.c
@@ -503,9 +503,11 @@ static void mem_cgroup_update_tree(struc
 			unsigned long flags;
 
 			spin_lock_irqsave(&mctz->lock, flags);
-			/* if on-tree, remove it */
-			if (mz->on_tree)
-				__mem_cgroup_remove_exceeded(mz, mctz);
+			/*
+			 * remove it first
+			 * If not on-tree, no tree ops.
+			 */
+			__mem_cgroup_remove_exceeded(mz, mctz);
 			/*
 			 * Insert again. mz->usage_in_excess will be updated.
 			 * If excess is 0, no tree ops.
_

Patches currently in -mm which might be from richard.weiyang@gmail.com are

mm-memcg-mem_cgroup_per_node-is-already-set-to-0-on-allocation.patch
mm-memcg-retrieve-parent-memcg-from-cssparent.patch
mm-memcg-set-memcg-after-css-verified-and-got-reference.patch
mm-memcg-set-pos-to-prev-unconditionally.patch
mm-memcg-move-generation-assignment-and-comparison-together.patch
mm-page_alloc-add-same-penalty-is-enough-to-get-round-robin-order.patch
mm-page_alloc-add-penalty-to-local_node.patch
memcg-do-not-tweak-node-in-alloc_mem_cgroup_per_node_info.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-14 21:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14 21:17 [to-be-updated] mm-memcg-__mem_cgroup_remove_exceeded-could-handle-a-on-tree-mz-properly.patch removed from -mm tree Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).