Change in vdsm[master]: Probe cpu count from new libvirt capabilities.

wudxw at linux.vnet.ibm.com wudxw at linux.vnet.ibm.com
Tue Feb 5 08:01:54 UTC 2013


Mark Wu has posted comments on this change.

Change subject: Probe cpu count from new libvirt capabilities.
......................................................................


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

(6 inline comments)

....................................................
Commit Message
Line 62: - cpuSockets: Count the number of distinct "socket_id".
Line 63: 
Line 64: [1] - http://libvirt.org/git/?p=libvirt.git;a=commit;h=79a003f9b0042ef4d2cf
Line 65: [2] - https://www.redhat.com/archives/libvir-list/2013-January/msg01140.html
Line 66: 
missed the bug link?
Line 67: Change-Id: I0e4a08cfcde6fb2e1ce4cf10478af72217c20ba5


....................................................
File tests/caps_libvirt.out
Line 84:             <cpu id='28' socket_id='1' core_id='4' siblings='28-29'/>
Line 85:             <cpu id='29' socket_id='1' core_id='5' siblings='28-29'/>
Line 86:             <cpu id='30' socket_id='1' core_id='6' siblings='30-31'/>
Line 87:             <cpu id='31' socket_id='1' core_id='7' siblings='30-31'/>
Line 88:           </cpus>
I suggest you include different cases as what the XML in commit message covers:
normal HT, this special AMD cpu and the mulitcore without HT.  It doesn't make senses for real world, but good for test. Actually,  I even think you needn't update the other sections in this test data. I know this cpu topology never happens on intel cpu, but it's ok for test.
Line 89:         </cell>
Line 90:       </cells>
Line 91:     </topology>
Line 92:     <secmodel>


....................................................
File tests/capsTests.py
Line 56:                                                 pfthreshold""".split()))
Line 57: 
Line 58:         self.assertEqual(c.mhz(), '1400.000')
Line 59:         self.assertEqual(c.model(),
Line 60:                          'AMD Opteron(TM) Processor 6274')
I don't understand why you also change the cpuinfo test.
Line 61: 
Line 62:     def testCpuTopology(self):
Line 63:         testPath = os.path.realpath(__file__)
Line 64:         dirName = os.path.split(testPath)[0]


....................................................
File vdsm/caps.py
Line 115:     siblingsList = []
Line 116:     for line in cells.getElementsByTagName('cpu'):
Line 117:         socket_id = line.getAttribute('socket_id')
Line 118:         siblings = line.getAttribute('siblings')
Line 119:         socketList.extend(socket_id)
it will cause problem when socket_id grows into two bits.  Why not just using 
socketList.append(socket_id)
Line 120:         siblingsList.extend([siblings])
Line 121: 
Line 122:     topology = {'sockets': len(set(socketList)),
Line 123:                 'cores': len(set(siblingsList)),


Line 116:     for line in cells.getElementsByTagName('cpu'):
Line 117:         socket_id = line.getAttribute('socket_id')
Line 118:         siblings = line.getAttribute('siblings')
Line 119:         socketList.extend(socket_id)
Line 120:         siblingsList.extend([siblings])
change to apend too?
Line 121: 
Line 122:     topology = {'sockets': len(set(socketList)),
Line 123:                 'cores': len(set(siblingsList)),
Line 124:                 'threads': cpus}


....................................................
File vdsm.spec.in
Line 120: Requires: qemu-kvm >= 2:0.15.0-4
Line 121: Requires: qemu-img >= 2:0.15.0-4
Line 122: # libvirt with detailed capabilities cpu data (rhbz 888503)
Line 123: # needed by vdsm to probe sockets/cores/threads information.
Line 124: Requires: libvirt >= 1.0.2-1
it seems not available in virt-preview. so we need wait util it's available.
Line 125: Requires: iscsi-initiator-utils >= 6.2.0.872-14
Line 126: Requires: device-mapper-multipath >= 0.4.9-18
Line 127: Requires: e2fsprogs >= 1.41.14
Line 128: Requires: kernel >= 3.6


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0e4a08cfcde6fb2e1ce4cf10478af72217c20ba5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amador Pahim <apahim at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list