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@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)
oVirt Jenkins CI Server has posted comments on this change.
Change subject: drop dead ksmtuned-related code ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8270/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7480/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8388/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: drop dead ksmtuned-related code ......................................................................
Patch Set 1: Code-Review+1
I like the idea and I look forward to have this cleanup in.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: drop dead ksmtuned-related code ......................................................................
Patch Set 2:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/516/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/8317/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/7527/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/8436/ : FAILURE
Martin Sivák has posted comments on this change.
Change subject: drop dead ksmtuned-related code ......................................................................
Patch Set 2: Code-Review+1
Killing ksmtuned sounds like a good plan to me..
Itamar Heim has posted comments on this change.
Change subject: drop dead ksmtuned-related code ......................................................................
Patch Set 2:
ping
Francesco Romani has posted comments on this change.
Change subject: drop dead ksmtuned-related code ......................................................................
Patch Set 3:
rebased. Preliminary verification: - created VM OK - waiting to have https://bugzilla.redhat.com/show_bug.cgi?id=1119775 resolved before to do more specific verification
Francesco Romani has posted comments on this change.
Change subject: drop dead ksmtuned-related code ......................................................................
Patch Set 3: Code-Review+1
+1 because no code changes (except the rebase fixes), thus still the original patch.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: drop dead ksmtuned-related code ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10263/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/11048/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1293/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/114... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc19_created/145... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/124/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11205/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: drop dead ksmtuned-related code ......................................................................
Patch Set 4:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/345... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/361/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11488/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12432/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1660/ : There was an infra issue, please contact infra@ovirt.org
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12277/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: drop dead ksmtuned-related code ......................................................................
Patch Set 4: Verified+1
Verified using a patched VDSM against master.
Cluster was configured to * enable KSM * desktop optimization (share 200%)
Run 64 empty tiny (16 MB ram each) VM on the host, verified that relevant fields are present in the vdsClient output, that they are meaningful (e.g. ksmState = True) and that they change over time.
Also verified that the tunables under /sys change over time - when meaningful of course. From all the above I think is safe to infer that KSM is working through MOM as expected.
Some sample output: [root@kenji ~]# vdsClient 0 getVdsStats | grep ksm ksmCpu = 0 ksmPages = 100 ksmState = False [root@kenji ~]# vdsClient 0 getVdsStats | grep ksm ksmCpu = 0 ksmPages = 100 ksmState = False [root@kenji ~]# systemctl restart vdsmd [root@kenji ~]# vdsClient 0 getVdsStats | grep ksm ksmCpu = 0 ksmPages = 100 ksmState = False [root@kenji ~]# vdsClient 0 getVdsStats | grep ksm ksmCpu = 0 ksmPages = 100 ksmState = False [root@kenji ~]# vdsClient 0 getVdsCaps | less [root@kenji ~]# vdsClient 0 getVdsStats | grep ksm ksmCpu = 7 ksmPages = 64 ksmState = True [root@kenji ~]# vdsClient 0 getVdsStats | grep ksm ksmCpu = 2 ksmPages = 64 ksmState = True [root@kenji ~]# vdsClient 0 getVdsStats | grep ksm ksmCpu = 2 ksmPages = 64 ksmState = True [root@kenji ~]# cat /sys/kernel/ config/ fscache/ iommu_groups/ kexec_crash_size mm/ profiling security/ uevent_helper vmcoreinfo debug/ fscaps kexec_crash_loaded kexec_loaded notes rcu_expedited slab/ uevent_seqnum [root@kenji ~]# cat /sys/kernel/ config/ fscache/ iommu_groups/ kexec_crash_size mm/ profiling security/ uevent_helper vmcoreinfo debug/ fscaps kexec_crash_loaded kexec_loaded notes rcu_expedited slab/ uevent_seqnum [root@kenji ~]# cat /sys/kernel/mm/ hugepages/ ksm/ transparent_hugepage/ [root@kenji ~]# cat /sys/kernel/mm/ksm/ full_scans merge_across_nodes pages_shared pages_sharing pages_to_scan pages_unshared pages_volatile run sleep_millisecs [root@kenji ~]# cat /sys/kernel/mm/ksm/ full_scans merge_across_nodes pages_shared pages_sharing pages_to_scan pages_unshared pages_volatile run sleep_millisecs [root@kenji ~]# cat /sys/kernel/mm/ksm/run 1 [root@kenji ~]# cat /sys/kernel/mm/ksm/pages_shar cat: /sys/kernel/mm/ksm/pages_shar: No such file or directory [root@kenji ~]# cat /sys/kernel/mm/ksm/pages_sharing 133031 [root@kenji ~]# cat /sys/kernel/mm/ksm/pages_to_scan 64 [root@kenji ~]# cat /sys/kernel/mm/ksm/pages_shared 91 [root@kenji ~]# cat /sys/kernel/mm/ksm/pages_shared 90 [root@kenji ~]# cat /sys/kernel/mm/ksm/pages_shared 90 [root@kenji ~]# vdsClient 0 getVdsStats | grep ksm ksmCpu = 0 ksmPages = 64 ksmState = True [root@kenji ~]#
Dan Kenigsberg has posted comments on this change.
Change subject: drop dead ksmtuned-related code ......................................................................
Patch Set 4: Code-Review+2
Thank you very much for dropping this dead code!
Dan Kenigsberg has submitted this change and it was merged.
Change subject: drop dead ksmtuned-related code ......................................................................
drop dead ksmtuned-related code
mom has replaced ksmtuned completely, and is expected to be running whenever Vdsm is. We can safely remove the unused ksm module.
Change-Id: I511fa1754e55076084529834fa9758c2fd139761 Signed-off-by: Dan Kenigsberg danken@redhat.com Reviewed-on: http://gerrit.ovirt.org/27026 Tested-by: Francesco Romani fromani@redhat.com --- M debian/vdsm.install M lib/vdsm/config.py.in M tests/Makefile.am D tests/ksmTests.py M vdsm.spec.in M vdsm/API.py M vdsm/Makefile.am M vdsm/clientIF.py D vdsm/ksm.py M vdsm/momIF.py M vdsm/sudoers.vdsm.in M vdsm/supervdsmServer M vdsm/virt/vm.py 13 files changed, 15 insertions(+), 218 deletions(-)
Approvals: Dan Kenigsberg: Looks good to me, approved Francesco Romani: Verified
oVirt Jenkins CI Server has posted comments on this change.
Change subject: drop dead ksmtuned-related code ......................................................................
Patch Set 5:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_create-rpms_merged/1872/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_create-rpms_merged_test_debug/213/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_verify-error-codes_merged/5846/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_merged/4005/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-el6-x86_64_merged/7/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-el7-x86_64_merged/3/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-fc20-x86_64_merged/2/ : FAILURE
vdsm-patches@lists.fedorahosted.org