Amador Pahim has posted comments on this change.
Change subject: Change source of CPU sockets/cores to libvirt capabilities
......................................................................
Patch Set 18: (2 inline comments)
....................................................
File tests/capsTests.py
Line 57: dirName = os.path.split(testPath)[0]
Line 58: path = os.path.join(dirName, "caps_libvirt.out")
Line 59: t = caps.CpuTopology(path)
Line 60: self.assertEqual(t.cores(), 12)
Line 61: self.assertEqual(t.sockets(), 2)
Done
Line 62:
Line 63: def test_parseKeyVal(self):
Line 64: lines = ["x=&2", "y& = 2", " z = 2 ", " s=3=&'5", " w=", "4&"]
Line 65: expectedRes = [{'x': '&2', 'y&': '2', 'z': '2', 's': "3=&'5",
'w': ''},
....................................................
File vdsm/caps.py
Line 87: def __init__(self, capabilities=None):
Line 88: self._topology = _getCpuTopology(capabilities)
Line 89:
Line 90: def threads(self):
Line 91: return (self._topology['threads'])
Yes, I got it.
It's correct. All "cpu" ("id" is a "cpu" attribute) elements are 2 levels below
"cells" and this way all of them will be counted.
Line 92:
Line 93: # this assumes that all numa nodes have the same number of sockets,
Line 94: # and that all socket have the same number of cores.
Line 95: def cores(self):
--
To view, visit http://gerrit.ovirt.org/5481
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1619e3d9e042bc801c988f099d3b84922f4e03d3
Gerrit-PatchSet: 18
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: Gal Hammer <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Shu Ming <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches