Skip to contentSkip to conversation

correct retry limit of balloon

RFC PATCH In review Akio Takebe 2 participants 3 messages Mar 25, 2007 – Mar 27, 2007

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 correct retry limit of balloon

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?

tools/python/xen/xend/balloon.py Sun Mar 25 09:38:02 2007 +0900 renamed from tools/python/xen/xend/balloon.py Thu Mar 22 18:41:15 2007 +0000 +1 -1
diff -r 2d918219f234 tools/python/xen/xend/balloon.py
@@ -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

#1 lore raw
Quoted 1 line

But log.debug message show retries. (Why? retries is always 0.)

retries is not always 0 especially on large systems. And it is incremented later on in the loop. I think patch should explain things more clearly.

http://xenbits.xensource.com/xen-unstable.hg?rev/93db1b536f38

Thanks
Aravindh

Quoted 15 lines

So I think the following patch is what you really want to do. What do you think?

diff -r 2d918219f234 tools/python/xen/xend/balloon.py

tools/python/xen/xend/balloon.py Sun Mar 25 09:38:02 2007 +0900 renamed from tools/python/xen/xend/balloon.py Thu Mar 22 18:41:15 2007 +0000 +1 -1
@@ -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) *
Quoted 2 lines

RETRY_LIMIT_INCR
log.debug("Balloon: %d KiB free; %d to scrub; need

%d;

Quoted 12 lines

retries: %d.",
free_mem, scrub_mem, need_mem, rlimit)

Best Regards,

Akio Takebe

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

Hi, Aravindh

Thank you for your explanation.
I understand clearly, it is reasonable.

Best Regards,

Akio Takebe

Quoted 11 lines
Quoted 1 line

But log.debug message show retries. (Why? retries is always 0.)

retries is not always 0 especially on large systems. And it is incremented later on in the loop. I think patch should explain things more clearly.

http://xenbits.xensource.com/xen-unstable.hg?rev/93db1b536f38

Thanks
Aravindh