[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vdsm-patches
Subject:    Change in vdsm[master]: Probe cpu count from new libvirt capabilities.
From:       danken () redhat ! com
Date:       2013-03-28 19:18:23
Message-ID: 201303281918.r2SJINIZ023453 () gerrit ! ovirt ! org
[Download RAW message or body]

Dan Kenigsberg has submitted this change and it was merged.

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


Probe cpu count from new libvirt capabilities.

vdsm is using libvirt to get cpu count information. Libvirt was not
reporting the right information on AMD Bulldozer 62XX processors
or unusual cpu architectures. To fix it , libvirt people introduced[1]
the expanded capabilities topology output:

<capabilities>
  <host>
    <topology>
      <cells num='3'>
        <cell id='0'>
          <cpus num='4'> <!-- this is node with Hyperthreading -->
            <cpu id='0' socket_id='0' core_id='0' siblings='0-1'/>
            <cpu id='1' socket_id='0' core_id='0' siblings='0-1'/>
            <cpu id='2' socket_id='0' core_id='1' siblings='2-3'/>
            <cpu id='3' socket_id='0' core_id='1' siblings='2-3'/>
          </cpus>
        </cell>
        <cell id='1'>
          <cpus num='4'> <!-- this is node with modules (Bulldozer) -->
            <cpu id='4' socket_id='0' core_id='2' siblings='4-5'/>
            <cpu id='5' socket_id='0' core_id='3' siblings='4-5'/>
            <cpu id='6' socket_id='0' core_id='4' siblings='6-7'/>
            <cpu id='7' socket_id='0' core_id='5' siblings='6-7'/>
          </cpus>
         </cell>
        <cell id='2'>
          <cpus num='4'> <!-- this is a normal multi-core node -->
            <cpu id='8' socket_id='1' core_id='0' siblings='8'/>
            <cpu id='9' socket_id='1' core_id='1' siblings='9'/>
            <cpu id='10' socket_id='1' core_id='2' siblings='10'/>
            <cpu id='11' socket_id='1' core_id='3' siblings='11'/>
          </cpus>
         </cell>
      </cells>
    </topology>
  </host>
</capabilities>

As libvirt use a fallback fake topology when probing unusual cpu
architectures (for example, AMD 6200 series), new capabilities is
the only reasonable source of information for any cpu architecture[2].

vdsm must be changed to read cpu information from this new source.

- cpuThreads: To gather the number of threads, take the total number of
processors by counting the "<cpu ...>" lines in the NUMA topology
section.

- cpuCores : Count the siblings information. The number of distinct
siblings info determines the number of cores. On a bulldozer machine
all cores have separate core_ID but they share the siblings, as they're
threads.

- cpuSockets: Count the number of distinct "socket_id".

[1] - http://libvirt.org/git/?p=libvirt.git;a=commit;h=79a003f9b0042ef4d2cf
[2] - https://www.redhat.com/archives/libvir-list/2013-January/msg01140.html

Change-Id: I0e4a08cfcde6fb2e1ce4cf10478af72217c20ba5
Signed-off-by: Amador Pahim <apahim@redhat.com>
---
M tests/Makefile.am
M tests/capsTests.py
D tests/caps_libvirt.out
A tests/caps_libvirt_amd_6274.out
A tests/caps_libvirt_intel_E31220.out
A tests/caps_libvirt_intel_E5649.out
M vdsm.spec.in
M vdsm/caps.py
8 files changed, 682 insertions(+), 199 deletions(-)

Approvals:
  Amador Pahim: Verified
  Dan Kenigsberg: Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0e4a08cfcde6fb2e1ce4cf10478af72217c20ba5
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amador Pahim <apahim@redhat.com>
Gerrit-Reviewer: Amador Pahim <apahim@redhat.com>
Gerrit-Reviewer: Anonymous Coward #1000373
Gerrit-Reviewer: Dan Kenigsberg <danken@redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland@redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw@linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic