linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] memcg: remove congestion wait when force empty
@ 2018-09-12  9:19 Li RongQing
  2018-09-12 13:49 ` Michal Hocko
  0 siblings, 1 reply; 2+ messages in thread
From: Li RongQing @ 2018-09-12  9:19 UTC (permalink / raw)
  To: linux-mm, linux-kernel; +Cc: hannes, mhocko, vdavydov.dev

memory.force_empty is used to empty a memory cgoup memory before
rmdir it, avoid to charge those memory into parent cgroup

when try_to_free_mem_cgroup_pages returns 0, guess there maybe be
lots of writeback, so wait. but the waiting and sleep will called
in shrink_inactive_list, based on numbers of isolated page, so
remove this wait to reduce unnecessary delay

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 mm/memcontrol.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 4ead5a4817de..35bd43eaa97e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2897,12 +2897,8 @@ static int mem_cgroup_force_empty(struct mem_cgroup *memcg)
 
 		progress = try_to_free_mem_cgroup_pages(memcg, 1,
 							GFP_KERNEL, true);
-		if (!progress) {
+		if (!progress)
 			nr_retries--;
-			/* maybe some writeback is necessary */
-			congestion_wait(BLK_RW_ASYNC, HZ/10);
-		}
-
 	}
 
 	return 0;
-- 
2.16.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-12 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-12  9:19 [PATCH] memcg: remove congestion wait when force empty Li RongQing
2018-09-12 13:49 ` Michal Hocko

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