[rh7,v2] mm/memcg: increase reparent timeout

Submitted by Andrey Ryabinin on Aug. 7, 2019, 11:34 a.m.

Details

Message ID 20190807113407.30759-1-aryabinin@virtuozzo.com
State New
Series "mm/memcg: increase reparent timeout"
Headers show

Commit Message

Andrey Ryabinin Aug. 7, 2019, 11:34 a.m.
Make it 20 min.

https://jira.sw.ru/browse/PSBM-96889
https://pmc.acronis.com/browse/VSTOR-25631
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---

Changes since v1:
 Add debug times printing

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

Patch hide | download patch | download mbox

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 884f1596bb24..5271921766d3 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4344,7 +4344,8 @@  static void mem_cgroup_reparent_charges(struct mem_cgroup *memcg)
 {
 	int node, zid;
 	/* Protection from leaked memcg->memory counter. */
-	unsigned long timeout = jiffies + HZ*120;
+	unsigned long start_time = jiffies;
+	unsigned long timeout = start_time + HZ*1200;
 
 	do {
 		/* This is for making all *used* pages to be on LRU. */
@@ -4382,10 +4383,11 @@  static void mem_cgroup_reparent_charges(struct mem_cgroup *memcg)
 	WARN_ONCE((page_counter_read(&memcg->memory) -
 			page_counter_read(&memcg->kmem) > 0),
 		  "memcg 0x%p leak suspected: "
-		  "memory=%lu, kmem=%lu",
+		  "memory=%lu, kmem=%lu start_time=%lx timeout=%lx jiffies=%lx",
 		  memcg,
 		  page_counter_read(&memcg->memory),
-		  page_counter_read(&memcg->kmem));
+		  page_counter_read(&memcg->kmem),
+		  start_time, timeout, jiffies);
 }
 
 /*