Change in vdsm[master]: Rename balloon_min to min_guarantee in balloon information
msivak at redhat.com
msivak at redhat.com
Fri Jul 12 14:28:52 UTC 2013
Martin Sivák has uploaded a new change for review.
Change subject: Rename balloon_min to min_guarantee in balloon information
......................................................................
Rename balloon_min to min_guarantee in balloon information
Adam Litke has requested a name change in the MoM API and
this patch updates the names here to comply with it.
Change-Id: Iecd4e234215d0d75a2f42da3303ca4d80053af26
Signed-off-by: Martin Sivak <msivak at redhat.com>
---
M vdsm/balloon.policy
M vdsm/vm.py
M vdsm_api/vdsmapi-schema.json
3 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/74/16774/1
diff --git a/vdsm/balloon.policy b/vdsm/balloon.policy
index 3b96815..4281554 100644
--- a/vdsm/balloon.policy
+++ b/vdsm/balloon.policy
@@ -46,7 +46,7 @@
# Given current conditions, determine the ideal guest memory size
(defvar guest_used_mem (- (guest.StatAvg "balloon_cur")
(guest.StatAvg "mem_unused")))
- (defvar balloon_min (min guest.balloon_min (+ guest_used_mem
+ (defvar balloon_min (min guest.min_guarantee (+ guest_used_mem
(* guest_free_percent guest.balloon_cur))))
# But do not change it too fast
(defvar balloon_size (* guest.balloon_cur
@@ -69,7 +69,7 @@
# Minimally, increase so the guest has its desired free memory
(defvar guest_used_mem (- (guest.StatAvg "balloon_cur")
(guest.StatAvg "mem_unused")))
- (defvar balloon_min (min guest.balloon_min (+ guest_used_mem
+ (defvar balloon_min (min guest.min_guarantee (+ guest_used_mem
(* guest_free_percent guest.balloon_cur))))
# Otherwise, increase according to the max balloon change
(defvar balloon_size (* guest.balloon_cur
@@ -108,7 +108,7 @@
(def guest_qos (quest)
{
- (if (< guest.balloon_cur guest.balloon_min)
+ (if (< guest.balloon_cur guest.min_guarantee)
(guest.Control "balloon_target" balloon_min) 0)
})
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 6502b65..0eb3ca7 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -4182,7 +4182,7 @@
min_mem = int(self.conf.get('memGuaranteedSize', '0')) * 1024
cur_mem = dev.get('target', max_mem)
return {'balloon_max': max_mem, 'balloon_cur': cur_mem,
- 'balloon_min': min_mem}
+ 'min_guarantee': min_mem}
return {}
def setBalloonTarget(self, target):
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index fbce59e..111ca8e 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -5069,12 +5069,12 @@
#
# @balloon_cur: The current amount of memory available to the guest (in KiB)
#
-# @balloon_min: The minimum amount of memory guaranteed to the guest (in KiB)
+# @min_guarantee: The minimum amount of memory guaranteed to the guest (in KiB)
#
# Since: 4.10.0
##
{'type': 'BalloonInfo',
- 'data': {'balloon_max': 'uint', 'balloon_cur': 'uint', 'balloon_min': 'uint'}}
+ 'data': {'balloon_max': 'uint', 'balloon_cur': 'uint', 'min_guarantee': 'uint'}}
##
# @GuestMountInfo:
--
To view, visit http://gerrit.ovirt.org/16774
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iecd4e234215d0d75a2f42da3303ca4d80053af26
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msivak at redhat.com>
More information about the vdsm-patches
mailing list