Change in vdsm[master]: Change source of CPU sockets/cores to libvirt capabilities

danken at redhat.com danken at redhat.com
Thu Oct 4 19:21:02 UTC 2012


Dan Kenigsberg has posted comments on this change.

Change subject: Change source of CPU sockets/cores to libvirt capabilities
......................................................................


Patch Set 17: I would prefer that you didn't submit this

(3 inline comments)

Ademar, thanks. I now understand that libvirt does not provide us with the complete topology information, only the number of threads per cell.

I think we should take what we have (exact number of threads), do the heuristic for what we don't, and make these fact explicit in the commit message.

....................................................
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 could have been nicer if caps_libvirt.out and cpu_info.out have reflected the same host. or better: have a set of host, each one with its caps_libvirt.out and cpu_info.out.

This can wait for a later patch.
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'] *
I think that you'd be better off summing up how many cpus appear under <cells>. This would accommodate "funky" numa topologies. What is your opinion?

Too bad that for cores and socket, we would have to assume symmetry between numa nodes.
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: 
Please add a little comment like:

 # this assumes that all numa nodes have the same number of sockets,
 # and that all socket have the same number of cores.

and explain this limitation in the commit message.
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