direct-io.hg

changeset 15251:6f06bd06ef47

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>
author kfraser@localhost.localdomain
date Mon Jun 11 10:16:54 2007 +0100 (2007-06-11)
parents a43a03d53781
children 31ee1768e911
files tools/python/xen/xend/balloon.py
line diff
     1.1 --- a/tools/python/xen/xend/balloon.py	Mon Jun 11 10:14:54 2007 +0100
     1.2 +++ b/tools/python/xen/xend/balloon.py	Mon Jun 11 10:16:54 2007 +0100
     1.3 @@ -102,6 +102,7 @@ def free(need_mem):
     1.4          retries = 0
     1.5          sleep_time = SLEEP_TIME_GROWTH
     1.6          last_new_alloc = None
     1.7 +        last_free = None
     1.8          rlimit = RETRY_LIMIT
     1.9          while retries < rlimit:
    1.10              physinfo = xc.physinfo()
    1.11 @@ -140,7 +141,9 @@ def free(need_mem):
    1.12              time.sleep(sleep_time)
    1.13              if retries < 2 * RETRY_LIMIT:
    1.14                  sleep_time += SLEEP_TIME_GROWTH
    1.15 -            retries += 1
    1.16 +            if last_free != None and last_free >= free_mem + scrub_mem:
    1.17 +                retries += 1
    1.18 +            last_free = free_mem + scrub_mem
    1.19  
    1.20          # Not enough memory; diagnose the problem.
    1.21          if dom0_min_mem == 0: