Change in vdsm[ovirt-3.3]: Allow disable MOM KSM control.
dfediuck at redhat.com
dfediuck at redhat.com
Sun Dec 8 11:01:12 UTC 2013
Hello Martin Sivák, Amador Pahim, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/22150
to review the following change.
Change subject: Allow disable MOM KSM control.
......................................................................
Allow disable MOM KSM control.
This patch add ksmEnabled var to enable/disable mom ksm control.
Now users can use vdsClient to runtime disable/enable
(default enabled) ksm control:
$ vdsClient -s 0 setMOMPolicyParameters ksmEnabled=False
Change-Id: Icc4333ce92561e23c062c398e24f876a74056a05
Bug-Url: http://bugzilla.redhat.com/1025780
Signed-off-by: Amador Pahim <apahim at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/20879
Reviewed-by: Martin Sivák <msivak at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M vdsm/mom.d/01-parameters.policy
M vdsm/mom.d/03-ksm.policy
2 files changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/50/22150/1
diff --git a/vdsm/mom.d/01-parameters.policy b/vdsm/mom.d/01-parameters.policy
index 980e71c..97803d5 100644
--- a/vdsm/mom.d/01-parameters.policy
+++ b/vdsm/mom.d/01-parameters.policy
@@ -1 +1,2 @@
(defvar balloonEnabled 0)
+(defvar ksmEnabled 1)
diff --git a/vdsm/mom.d/03-ksm.policy b/vdsm/mom.d/03-ksm.policy
index 415fcfd..5a3b1bd 100644
--- a/vdsm/mom.d/03-ksm.policy
+++ b/vdsm/mom.d/03-ksm.policy
@@ -41,8 +41,8 @@
(defvar ksm_pressure_threshold (* Host.mem_available ksm_free_percent))
(defvar ksm_committed Host.ksm_shareable)
-(if (and (< (+ ksm_pressure_threshold ksm_committed) Host.mem_available)
- (> (Host.StatAvg "mem_free") ksm_pressure_threshold))
+(if (or (and (< (+ ksm_pressure_threshold ksm_committed) Host.mem_available)
+ (> (Host.StatAvg "mem_free") ksm_pressure_threshold)) (not ksmEnabled))
(Host.Control "ksm_run" 0)
{ # else
(Host.Control "ksm_run" 1)
--
To view, visit http://gerrit.ovirt.org/22150
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc4333ce92561e23c062c398e24f876a74056a05
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Amador Pahim <apahim at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
More information about the vdsm-patches
mailing list