Change in vdsm[master]: sampling: Handle numa nodes with zero memory assigned

alukiano at redhat.com alukiano at redhat.com
Wed Jul 29 10:15:42 UTC 2015


Artyom Lukianov has posted comments on this change.

Change subject: sampling: Handle numa nodes with zero memory assigned
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/44121/1/vdsm/virt/sampling.py
File vdsm/virt/sampling.py:

Line 179:             else:
Line 180:                 memInfo = caps.getMemoryStatsByNumaCell(int(nodeIndex))
Line 181:             nodeMemSample['memFree'] = memInfo['free']
Line 182:             # in case the numa node has zero memory assigned, report the whole
Line 183:             # memory as used
nodeMemSample['memPercent'] = 100
if memInfo['total'] != 0:
    nodeMemSample['memPercent'] -= int(
        100.0 * int(memInfo['free']) / int(memInfo['total'])
    )
just looks better
Line 184:             if memInfo['total'] == 0:
Line 185:                 nodeMemSample['memPercent'] = 100
Line 186:             else:
Line 187:                 nodeMemSample['memPercent'] = 100 - \


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6be69e715e9b4a0cc8ded744b0bcc192a466c6c8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Roman Mohr <rmohr at redhat.com>
Gerrit-Reviewer: Andrej Krejcir <akrejcir at redhat.com>
Gerrit-Reviewer: Artyom Lukianov <alukiano at redhat.com>
Gerrit-Reviewer: Dudi Maroshi <dudi at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list