[RHEL7,COMMIT] mm/memcg: increase reparent timeout

Submitted by Konstantin Khorenko on Aug. 8, 2019, 3:01 p.m.

Details

Message ID 201908081501.x78F1UaP018346@finist-ce7.sw.ru
State New
Series "mm/memcg: increase reparent timeout"
Headers show

Commit Message

Konstantin Khorenko Aug. 8, 2019, 3:01 p.m.
The commit is pushed to "branch-rh7-3.10.0-957.21.3.vz7.106.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.21.3.vz7.106.10
------>
commit 12158899dba3a42eab5fb5a328b37dfb36a3bf25
Author: Andrey Ryabinin <aryabinin@virtuozzo.com>
Date:   Thu Aug 8 18:01:30 2019 +0300

    mm/memcg: increase reparent timeout
    
    Make it 20 min.
    
    Fixes: 6c56498a819e ("mm/memcg: use timeout instead of iteration count to
    determine leak.")
    
    https://jira.sw.ru/browse/PSBM-96889
    https://pmc.acronis.com/browse/VSTOR-25631
    Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
 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);
 }
 
 /*