Search
j0ke.net Open Build Service
>
Projects
>
virtualization
:
Cloud
:
oVirt
:
3.3.2
>
vdsm
> 0007-Allow-disable-MOM-KSM-control.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0007-Allow-disable-MOM-KSM-control.patch of Package vdsm
From 35019eb333d5dbe6d8c7150a5283ca196f6866df Mon Sep 17 00:00:00 2001 From: Amador Pahim <apahim@redhat.com> Date: Mon, 11 Nov 2013 09:04:47 -0300 Subject: [PATCH 07/11] Allow disable MOM KSM control. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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@redhat.com> Reviewed-on: http://gerrit.ovirt.org/20879 Reviewed-by: Martin Sivák <msivak@redhat.com> Reviewed-by: Dan Kenigsberg <danken@redhat.com> Reviewed-on: http://gerrit.ovirt.org/22150 Reviewed-by: Yaniv Bronhaim <ybronhei@redhat.com> Tested-by: Yaniv Bronhaim <ybronhei@redhat.com> --- vdsm/mom.d/01-parameters.policy | 1 + vdsm/mom.d/03-ksm.policy | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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) -- 1.8.4.2