diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-06-11 10:16:54 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-06-11 10:16:54 +0100 |
commit | 1606c2497d0461029bd566c45ce7ede6e56bdc02 (patch) | |
tree | 1048d0e902fd231121f02dae1ad84421f82e4696 /tools | |
parent | 34eef3528023013c168b8a14e697568ce6eb218c (diff) | |
download | xen-1606c2497d0461029bd566c45ce7ede6e56bdc02.tar.gz xen-1606c2497d0461029bd566c45ce7ede6e56bdc02.tar.bz2 xen-1606c2497d0461029bd566c45ce7ede6e56bdc02.zip |
xend: Do not give up auto-ballooning if ballooning is proceeding okay.
Under a loaded system, don't give up ballooning dom0 unless it's not
responding at all.
Signed-off-by: Ryan Scott <ryan.scott@sun.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/python/xen/xend/balloon.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/python/xen/xend/balloon.py b/tools/python/xen/xend/balloon.py index ff051da88e..9a57cf9ac9 100644 --- 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: |