8ba0a58 virCaps: Expose distance between host NUMA nodes

Authored and Committed by mprivozn 10 years ago
    virCaps: Expose distance between host NUMA nodes
    
    If user or management application wants to create a guest,
    it may be useful to know the cost of internode latencies
    before the guest resources are pinned. For example:
    
    <capabilities>
    
      <host>
        ...
        <topology>
          <cells num='2'>
            <cell id='0'>
              <memory unit='KiB'>4004132</memory>
              <distances>
                <sibling id='0' value='10'/>
                <sibling id='1' value='20'/>
              </distances>
              <cpus num='2'>
                <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
                <cpu id='2' socket_id='0' core_id='2' siblings='2'/>
              </cpus>
            </cell>
            <cell id='1'>
              <memory unit='KiB'>4030064</memory>
              <distances>
                <sibling id='0' value='20'/>
                <sibling id='1' value='10'/>
              </distances>
              <cpus num='2'>
                <cpu id='1' socket_id='0' core_id='0' siblings='1'/>
                <cpu id='3' socket_id='0' core_id='2' siblings='3'/>
              </cpus>
            </cell>
          </cells>
        </topology>
        ...
      </host>
      ...
    </capabilities>
    
    We can see the distance from node1 to node0 is 20 and within nodes 10.
    
    Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
    
        
file modified
+15 -0
file modified
+22 -3
file modified
+13 -2
file modified
+3 -2
file modified
+59 -3
file modified
+3 -2
file modified
+3 -1
file modified
+2 -2