]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
nodeinfo: Fix output on PPC64 KVM hosts
authorShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
Thu, 30 Jul 2015 09:37:04 +0000 (11:37 +0200)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 3 Aug 2015 12:38:46 +0000 (08:38 -0400)
commit014208c4d028d2a632cdfe89d361fca8811899b6
treecc6cf89c9d2babd741b4aa2384299c56085f5524
parentd9c9e138f22c48626f719f880920e04c639e0177
nodeinfo: Fix output on PPC64 KVM hosts

The nodeinfo is reporting incorrect number of cpus and incorrect host
topology on PPC64 KVM hosts. The KVM hypervisor on PPC64 needs only
the primary thread in a core to be online, and the secondaries offlined.
While scheduling a guest in, the kvm scheduler wakes up the secondaries to
run in guest context.

The host scheduling of the guests happen at the core level(as only primary
thread is online). The kvm scheduler exploits as many threads of the core
as needed by guest. Further, starting POWER8, the processor allows splitting
a physical core into multiple subcores with 2 or 4 threads each. Again, only
the primary thread in a subcore is online in the host. The KVM-PPC
scheduler allows guests to exploit all the offline threads in the subcore,
by bringing them online when needed.
(Kernel patches on split-core http://www.spinics.net/lists/kvm-ppc/msg09121.html)

Recently with dynamic micro-threading changes in ppc-kvm, makes sure
to utilize all the offline cpus across guests, and across guests with
different cpu topologies.
(https://www.mail-archive.com/kvm@vger.kernel.org/msg115978.html)

Since the offline cpus are brought online in the guest context, it is safe
to count them as online. Nodeinfo today discounts these offline cpus from
cpu count/topology calclulation, and the nodeinfo output is not of any help
and the host appears overcommited when it is actually not.

The patch carefully counts those offline threads whose primary threads are
online. The host topology displayed by the nodeinfo is also fixed when the
host is in valid kvm state.

Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
src/libvirt_private.syms
src/nodeinfo.c
src/nodeinfo.h