Dan Kenigsberg has posted comments on this change.
Change subject: Online check ksmState and ksmPages.
......................................................................
Patch Set 2: I would prefer that you didn't submit this
(2 inline comments)
....................................................
File vdsm/API.py
Line 1126: stats['momStatus'] = self._cif.mom.getStatus()
Line 1127: stats.update(self._cif.mom.getKsmStats())
Line 1128: else:
Line 1129: stats['momStatus'] = 'disabled'
Line 1130: stats['ksmState'] = self._cif.ksmState()
this would explode, as _cif has no ksmState attribute. You probably want to
call ksm.running().
Line 1131: stats['ksmPages'] = self._cif.ksmPages()
Line 1132: stats['ksmCpu'] = self._cif.ksmMonitor.cpuUsage
Line 1133: stats['memShared'] = self._memShared() / Mbytes
Line 1134:
....................................................
File vdsm/ksm.py
Line 87: except:
Line 88: return 0
Line 89:
Line 90:
Line 91: def ksmState():
I don't think there is any urgent reason to change anything in this function.
please concentrate the patch on the bug fixing. refactoring can wait to a
separate patch (and frankly, I do not think it is required).
Line 92: try:
Line 93: return int(file('/sys/kernel/mm/ksm/run').read()) & 1 == 1
Line 94: except:
Line 95: return False
--
To view, visit http://gerrit.ovirt.org/9510
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I84c2f8b80529a47662bdeac80bb3f71defd0758a
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amador Pahim <[email protected]>
Gerrit-Reviewer: Amador Pahim <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Royce Lv <[email protected]>
Gerrit-Reviewer: Xu He Jie <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches