Change in vdsm[master]: numa: use defaultdict to simplify the code

danken at redhat.com danken at redhat.com
Thu Jan 22 10:55:34 UTC 2015


Dan Kenigsberg has posted comments on this change.

Change subject: numa: use defaultdict to simplify the code
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.ovirt.org/#/c/36662/3/vdsm/numaUtils.py
File vdsm/numaUtils.py:

Line 79:                 vNodeIndex = str(vcpu_to_vnode[vCpu])
Line 80:                 vm_numa_placement[vNodeIndex].add(pcpu_to_pnode[pCpu])
Line 81:                 vm_numa_placement[vNodeIndex].update(
Line 82:                     vcpu_to_pnode.get(vCpu, ()))
Line 83:             vmNumaNodeRuntimeMap = dict([(k, list(v)) for k, v in
I don't think that the convesion to list() is necessary. let's drop it in another patch, as it changes the type of this function.
Line 84:                                         vm_numa_placement.iteritems()])
Line 85:     return vmNumaNodeRuntimeMap
Line 86: 
Line 87: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9c0ee4c4291f2bd5fe2fb639752ef8e46aecc6be
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list