Change in vdsm[master]: Instead of PAGE_SIZE_BYTES use os.sysconf('SC_PAGESIZE')

danken at redhat.com danken at redhat.com
Tue Mar 8 12:26:25 UTC 2016


Dan Kenigsberg has posted comments on this change.

Change subject: Instead of PAGE_SIZE_BYTES use os.sysconf('SC_PAGESIZE')
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/54155/1/vdsm/API.py
File vdsm/API.py:

Line 1673:                 with open('/proc/' + v.conf['pid'] + '/statm') as statmfile:
Line 1674:                     resident += int(statmfile.read().split()[1])
Line 1675:             except:
Line 1676:                 pass
Line 1677:         resident *= os.sysconf('SC_PAGESIZE')
this is called quite often. can we throw PAGE_SIZE_BYTE to the vdsm.utils junk yard?
Line 1678:         meminfo = utils.readMemInfo()
Line 1679:         freeOrCached = (meminfo['MemFree'] +
Line 1680:                         meminfo['Cached'] + meminfo['Buffers']) * Kbytes
Line 1681:         return freeOrCached + resident - memCommitted - \


-- 
To view, visit https://gerrit.ovirt.org/54155
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7ca893f4cfb14c67788d96a0ced96e6325f0d0c5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list