linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [Patch v3] mm/memcg: mz already removed from rb_tree if not NULL
@ 2022-03-14 23:30 Wei Yang
  0 siblings, 0 replies; only message in thread
From: Wei Yang @ 2022-03-14 23:30 UTC (permalink / raw)
  To: hannes, mhocko, vdavydov.dev, akpm; +Cc: cgroups, linux-mm, Wei Yang

When mz is not NULL, it means mz can either come from
mem_cgroup_largest_soft_limit_node or __mem_cgroup_largest_soft_limit_nod.
And both of them has removed this node by __mem_cgroup_remove_exceeded().

Not necessary to call __mem_cgroup_remove_exceeded() again.

[fmhocko@suse.com: refine changelog]
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---
 mm/memcontrol.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index dc225ca512f6..e803ff02aae2 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3460,7 +3460,6 @@ unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order,
 		nr_reclaimed += reclaimed;
 		*total_scanned += nr_scanned;
 		spin_lock_irq(&mctz->lock);
-		__mem_cgroup_remove_exceeded(mz, mctz);
 
 		/*
 		 * If we failed to reclaim anything from this memory cgroup
-- 
2.33.1



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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14 23:30 [Patch v3] mm/memcg: mz already removed from rb_tree if not NULL Wei Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox