WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Do not give up if ballooning is proceeding

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Do not give up if ballooning is proceeding
From: john.levon@xxxxxxx
Date: Fri, 08 Jun 2007 05:22:00 -0700
Delivery-date: Fri, 08 Jun 2007 05:20:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User john.levon@xxxxxxx
# Date 1181305195 25200
# Node ID 286d8ec9ccf4082b8db0a17a8ab74ad32a2bf218
# Parent  8125c43b826823522611b7d7eae4b45b404c1ade
Do not give up if ballooning is proceeding

Under a loaded system, don't give up ballooning dom0 unless it's not responding
at all.

Signed-off-by: Ryan Scott

diff --git a/tools/python/xen/xend/balloon.py b/tools/python/xen/xend/balloon.py
--- a/tools/python/xen/xend/balloon.py
+++ b/tools/python/xen/xend/balloon.py
@@ -102,6 +102,7 @@ def free(need_mem):
         retries = 0
         sleep_time = SLEEP_TIME_GROWTH
         last_new_alloc = None
+        last_free = None
         rlimit = RETRY_LIMIT
         while retries < rlimit:
             physinfo = xc.physinfo()
@@ -140,7 +141,9 @@ def free(need_mem):
             time.sleep(sleep_time)
             if retries < 2 * RETRY_LIMIT:
                 sleep_time += SLEEP_TIME_GROWTH
-            retries += 1
+            if last_free != None and last_free >= free_mem + scrub_mem:
+                retries += 1
+            last_free = free_mem + scrub_mem
 
         # Not enough memory; diagnose the problem.
         if dom0_min_mem == 0:

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Do not give up if ballooning is proceeding, john . levon <=