Change in vdsm[master]: Change source of CPU sockets/cores to libvirt capabilities
danken at redhat.com
danken at redhat.com
Fri Oct 5 07:14:10 UTC 2012
Dan Kenigsberg has posted comments on this change.
Change subject: Change source of CPU sockets/cores to libvirt capabilities
......................................................................
Patch Set 18: I would prefer that you didn't submit this
(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)
I suppose we have to add a test for threads() to catch the error I've noticed now.
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'])
are you sure this is correct? I thought it returns only threads-per-code.
I was suggesting to count the number of <cpu id=/> elements under <topology>
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 <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