Change in vdsm[master]: start ksm and ksmtuned when vdsm starts

smizrahi at redhat.com smizrahi at redhat.com
Mon Oct 15 17:45:04 UTC 2012


Saggi Mizrahi has posted comments on this change.

Change subject: start ksm and ksmtuned when vdsm starts
......................................................................


Patch Set 3: (3 inline comments)

....................................................
File vdsm/ksm.py
Line 65:         except:
Line 66:             self._cif.log.error("Error monitoring KSM", exc_info=True)
Line 67: 
Line 68:     def readState(self):
Line 69:         return ksm_running(), npages()
Where is ksm_running declared?
Line 70: 
Line 71:     def adjust(self):
Line 72:         """adjust ksm state according to configuration and current memory stress
Line 73:         return whether ksm is running"""


Line 85:             return (int(file('/sys/kernel/mm/ksm/pages_sharing').read()))
Line 86:         except:
Line 87:             return 0
Line 88: 
Line 89: def npages():
If we are in the mood for renaming. This could be pagesToScan().
Line 90:     try:
Line 91:         npages = int(file('/sys/kernel/mm/ksm/pages_to_scan').read())
Line 92:         return npages
Line 93:     except:


Line 92:         return npages
Line 93:     except:
Line 94:         return 0
Line 95: 
Line 96: def ksm_start():
No need to change to ksm_start as the module name is sufficient.

You could change to startDaemon() if you want to specify what you are starting.

In any case we use mixedCase in VDSM
Line 97:     utils.execCmd([constants.EXT_SERVICE, 'ksmtuned', 'start'], sudo=True)
Line 98:     utils.execCmd([constants.EXT_SERVICE, 'ksm', 'start'], sudo=True)
Line 99: 
Line 100: def tune(params):


--
To view, visit http://gerrit.ovirt.org/8357
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia50087aae112069b2a427fca12168aff975b443e
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <lhornyak at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Shu Ming <shuming at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list