From: Akio Takebe Subject: [Patch][RFC] correct retry limit of balloon Date: Sun, 25 Mar 2007 09:50:04 +0900 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org Hi, all Balloon wait free memory become enough need memory. The waiting time is retries * rlimit. When retries =0, rlimit add ((need_mem - free_mem)/1024/1024) * RETRY_LIMIT_INCR once for all. But log.debug message show retries. (Why? retries is always 0.) So I think the following patch is what you really want to do. What do you think? Signed-off-by: Akio Takebe diff -r 2d918219f234 tools/python/xen/xend/balloon.py --- a/tools/python/xen/xend/balloon.py Thu Mar 22 18:41:15 2007 +0000 +++ b/tools/python/xen/xend/balloon.py Sun Mar 25 09:38:02 2007 +0900 @@ -127,7 +127,7 @@ def free(need_mem): free_mem, need_mem) return - if retries == 0: + if retries != 0: rlimit += ((need_mem - free_mem)/1024/1024) * RETRY_LIMIT_INCR log.debug("Balloon: %d KiB free; %d to scrub; need %d; retries: %d.", free_mem, scrub_mem, need_mem, rlimit) Best Regards, Akio Takebe