Export the cpu nodes and sockets from Xen
authorIustin Pop <iustin@google.com>
Mon, 9 Feb 2009 10:41:21 +0000 (10:41 +0000)
committerIustin Pop <iustin@google.com>
Mon, 9 Feb 2009 10:41:21 +0000 (10:41 +0000)
commit0105bad3ec72cc69dc92ce6eec7deb8c744e65ae
tree9c9e72451d8cf2cf04be0ecd1d6f9876d217b434
parent1268d6fde96368aa6574afa762857932b3624f64
Export the cpu nodes and sockets from Xen

This is a hand-picked forward patch of commit 1755 on the 1.2 branch
(hand-picked since the trees diverged too much since then):

    The patch changed the xen hypervisor to compute the number of cpu
    sockets/nodes and enables the command line and the RAPI to show this
    information (for RAPI is enabled by default in node details, for gnt-one
    one can use the new “cnodes” and “csockets” fields).

    Originally-Reviewed-by: ultrotter

For the KVM and fake hypervisors, the patch just exports 1 for both
nodes and sockets. This can be fixed, by looking at the
/sys/devices/system/cpu/cpuN/topology directories, and computing the
actual information, but that should be done in a separate patch.

Reviewed-by: imsnah
lib/cmdlib.py
lib/hypervisor/hv_fake.py
lib/hypervisor/hv_kvm.py
lib/hypervisor/hv_xen.py
lib/rapi/rlib2.py
scripts/gnt-node