Martin Sivák has uploaded a new change for review.

Change subject: [WIP] Use balloon_min to set the minimum guaranteed memory 
available
......................................................................

[WIP] Use balloon_min to set the minimum guaranteed memory available

Changes in this patch should ensure the minimal memory guarantee
needed for a rudimentary memory QoS support.

This change requires a VDSM patch http://gerrit.ovirt.org/15799.

Change-Id: I376ac6b2cdadc567314899a95c6b855f820e746b
Signed-off-by: Martin Sivak <[email protected]>
---
M doc/balloon.rules
M mom/HypervisorInterfaces/libvirtInterface.py
2 files changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/mom refs/changes/01/15801/1

diff --git a/doc/balloon.rules b/doc/balloon.rules
index 660c724..3a79ef7 100644
--- a/doc/balloon.rules
+++ b/doc/balloon.rules
@@ -46,8 +46,8 @@
     # Given current conditions, determine the ideal guest memory size
     (defvar guest_used_mem (- (guest.StatAvg "balloon_cur")
                               (guest.StatAvg "mem_unused")))
-    (defvar balloon_min (+ guest_used_mem
-                           (* guest_free_percent guest.balloon_cur)))
+    (defvar balloon_min (min guest.balloon_min (+ guest_used_mem
+                           (* guest_free_percent guest.balloon_cur))))
     # But do not change it too fast
     (defvar balloon_size (* guest.balloon_cur
                             (- 1 max_balloon_change_percent)))
diff --git a/mom/HypervisorInterfaces/libvirtInterface.py 
b/mom/HypervisorInterfaces/libvirtInterface.py
index 810f633..e406f75 100644
--- a/mom/HypervisorInterfaces/libvirtInterface.py
+++ b/mom/HypervisorInterfaces/libvirtInterface.py
@@ -214,7 +214,8 @@
         if info is None:
             self.logger.error('Failed to get domain info')
             return None
-        ret =  {'balloon_max': info[1], 'balloon_cur': info[2]}
+        ret =  {'balloon_max': info[1], 'balloon_cur': info[2],
+                'balloon_min': 0} # TODO
         return ret
 
     def setVmBalloonTarget(self, uuid, target):


-- 
To view, visit http://gerrit.ovirt.org/15801
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I376ac6b2cdadc567314899a95c6b855f820e746b
Gerrit-PatchSet: 1
Gerrit-Project: mom
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to