Change in vdsm[master]: Change source of CPU sockets/cores to libvirt capabilities
apahim at redhat.com
apahim at redhat.com
Thu Oct 4 20:36:38 UTC 2012
Amador Pahim has posted comments on this change.
Change subject: Change source of CPU sockets/cores to libvirt capabilities
......................................................................
Patch Set 17: No score
(3 inline comments)
....................................................
File tests/capsTests.py
Line 54:
Line 55: def testCpuTopology(self):
Line 56: testPath = os.path.realpath(__file__)
Line 57: dirName = os.path.split(testPath)[0]
Line 58: path = os.path.join(dirName, "caps_libvirt.out")
It does. The caps_libvirt.out was extracted from the same cpu_info.out host (2 x Intel E5649).
Line 59: t = caps.CpuTopology(path)
Line 60: self.assertEqual(t.cores(), 12)
Line 61: self.assertEqual(t.sockets(), 2)
Line 62:
....................................................
File vdsm/caps.py
Line 88: self._topology = _getCpuTopology(capabilities)
Line 89:
Line 90: def threads(self):
Line 91: return (self._topology['cells'] *
Line 92: self._topology['sockets'] *
Sure. I agree. This will bypass any "funky" topology.
Line 93: self._topology['cores'] *
Line 94: self._topology['threads'])
Line 95:
Line 96: def cores(self):
Line 91: return (self._topology['cells'] *
Line 92: self._topology['sockets'] *
Line 93: self._topology['cores'] *
Line 94: self._topology['threads'])
Line 95:
Done
Line 96: def cores(self):
Line 97: return (self._topology['cells'] *
Line 98: self._topology['sockets'] *
Line 99: self._topology['cores'])
--
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: 17
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amador Pahim <apahim at redhat.com>
Gerrit-Reviewer: Amador Pahim <apahim at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Gal Hammer <ghammer at redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Shu Ming <shuming at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list