Dan Kenigsberg has uploaded a new change for review.
Change subject: drop dead ksmtuned-related code
......................................................................
drop dead ksmtuned-related code
mom has replaced ksmtuned completely, so we can safely remove the unused
code.
Change-Id: I511fa1754e55076084529834fa9758c2fd139761
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/ksm.py
M vdsm/sudoers.vdsm.in
M vdsm/virt/vm.py
3 files changed, 1 insertion(+), 29 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/26/27026/1
diff --git a/vdsm/ksm.py b/vdsm/ksm.py
index 7ace217..c9cb3b1 100644
--- a/vdsm/ksm.py
+++ b/vdsm/ksm.py
@@ -45,7 +45,6 @@
self.setDaemon(True)
self._cif = cif
self.state, self.pages = False, 0
- self._lock = threading.Lock()
if config.getboolean('ksm', 'ksm_monitor_thread'):
pids = utils.execCmd([constants.EXT_PGREP, '-xf', 'ksmd'],
raw=False)[1]
@@ -78,18 +77,6 @@
except:
self._cif.log.error("Error monitoring KSM", exc_info=True)
- def adjust(self):
- """Adjust ksm's vigor
-
- Recalculate how hard should ksm work, according to configuration and
- current memory stress.
- Return whether ksm is running"""
-
- with self._lock:
- utils.execCmd([constants.EXT_SERVICE, 'ksmtuned', 'retune'],
- sudo=True)
- return running()
-
def memsharing(self):
return _readProcFSInt('/sys/kernel/mm/ksm/pages_sharing')
@@ -101,11 +88,6 @@
def npages():
return _readProcFSInt('/sys/kernel/mm/ksm/pages_to_scan')
-
-
-def start():
- utils.execCmd([constants.EXT_SERVICE, 'ksmtuned', 'start'],
sudo=True)
- utils.execCmd([constants.EXT_SERVICE, 'ksm', 'start'], sudo=True)
def tune(params):
diff --git a/vdsm/sudoers.vdsm.in b/vdsm/sudoers.vdsm.in
index 584807d..2b745d3 100644
--- a/vdsm/sudoers.vdsm.in
+++ b/vdsm/sudoers.vdsm.in
@@ -1,8 +1,6 @@
Cmnd_Alias VDSM_LIFECYCLE = \
@DMIDECODE_PATH@, \
- @VDSMDIR@/mk_sysprep_floppy, \
- @SERVICE_PATH@ ksmtuned *, \
- @SERVICE_PATH@ ksm *
+ @VDSMDIR@/mk_sysprep_floppy
Cmnd_Alias VDSM_STORAGE = @MOUNT_PATH@, @UMOUNT_PATH@, \
@FSCK_PATH@ -p *, \
@TUNE2FS_PATH@ -j *, \
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 79ff40b..0bb1e85 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -1925,12 +1925,6 @@
self._vmCreationEvent.set()
try:
self._run()
- if self.lastStatus != vmstatus.DOWN and not self.recovering \
- and not self.cif.mom:
- # If MOM is available, we needn't tell it to adjust KSM
- # behaviors on VM start/destroy, because the tuning can be
- # done automatically according to its statistical data.
- self.cif.ksmMonitor.adjust()
except Exception:
if not self.recovering:
raise
@@ -4273,8 +4267,6 @@
else:
self.log.warn("VM %s is not running",
self.conf['vmId'])
- if not self.cif.mom:
- self.cif.ksmMonitor.adjust()
self._cleanup()
self.cif.irs.inappropriateDevices(self.id)
--
To view, visit
http://gerrit.ovirt.org/27026
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I511fa1754e55076084529834fa9758c2fd139761
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>