[Devel] [PATCH rh7] Revert "mm/memcg: Don't stuck in mem_cgroup_reparent_charges() forever"

Andrey Ryabinin aryabinin at virtuozzo.com
Mon Jul 2 17:34:03 MSK 2018


This reverts commit e53270d201af7d1cbf86cd65ed35a479f0901b86.

This was wrong thing to do. If page is isolated from lru for a long
period of time, e.g. to perform writeback, the warning in
mem_cgroup_reparent_charges() will be false-positively triggered.

https://jira.sw.ru/browse/PSBM-86293
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
 mm/memcontrol.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 755c09e050a7..59cf47972f9e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4010,7 +4010,6 @@ static void mem_cgroup_force_empty_list(struct mem_cgroup *memcg,
  */
 static void mem_cgroup_reparent_charges(struct mem_cgroup *memcg)
 {
-	int nr_retries = MEM_CGROUP_RECLAIM_RETRIES;
 	int node, zid;
 
 	do {
@@ -4031,11 +4030,6 @@ static void mem_cgroup_reparent_charges(struct mem_cgroup *memcg)
 		memcg_oom_recover(memcg);
 		cond_resched();
 
-		if (WARN(!--nr_retries, "memory %ld > kmem %ld\n",
-				page_counter_read(&memcg->memory),
-				page_counter_read(&memcg->kmem)))
-			break;
-
 		/*
 		 * Kernel memory may not necessarily be trackable to a specific
 		 * process. So they are not migrated, and therefore we can't
@@ -4050,8 +4044,6 @@ static void mem_cgroup_reparent_charges(struct mem_cgroup *memcg)
 		 */
 	} while (page_counter_read(&memcg->memory) -
 		 page_counter_read(&memcg->kmem) > 0);
-
-	WARN_ON(!nr_retries);
 }
 
 /*
-- 
2.16.4



More information about the Devel mailing list