libvirt/src/xen
Jiri Denemark ac9dd4a676 Fix host CPU counting on unusual NUMA topologies
The nodeinfo structure includes

    nodes   : the number of NUMA cell, 1 for uniform mem access
    sockets : number of CPU socket per node
    cores   : number of core per socket
    threads : number of threads per core

which does not work well for NUMA topologies where each node does not
consist of integral number of CPU sockets.

We also have VIR_NODEINFO_MAXCPUS macro in public libvirt.h which
computes maximum number of CPUs as (nodes * sockets * cores * threads).

As a result, we can't just change sockets to report total number of
sockets instead of sockets per node. This would probably be the easiest
since I doubt anyone is using the field directly. But because of the
macro, some apps might be using sockets indirectly.

This patch leaves sockets to be the number of CPU sockets per node (and
fixes qemu driver to comply with this) on machines where sockets can be
divided by nodes. If we can't divide sockets by nodes, we behave as if
there was just one NUMA node containing all sockets. Apps interested in
NUMA should consult capabilities XML, which is what they probably do
anyway.

This way, the only case in which apps that care about NUMA may break is
on machines with funky NUMA topology. And there is a chance libvirt
wasn't able to start any guests on those machines anyway (although it
depends on the topology, total number of CPUs and kernel version).
Nothing changes at all for apps that don't care about NUMA.
2010-11-25 10:49:47 +01:00
..
block_stats.c deprecate fclose() and introduce VIR_{FORCE_}FCLOSE() 2010-11-16 21:13:29 -05:00
block_stats.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
sexpr.c Fix Xen SEXPR generation to properly quote strings containing () 2010-10-13 16:42:48 +01:00
sexpr.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
xen_driver.c Implementations of virDomainIsUpdated for drivers except qemu 2010-11-24 11:22:30 -07:00
xen_driver.h xen-proxy: Remove it entirely and use libvirtd instead 2010-11-08 22:00:35 +01:00
xen_hypervisor.c deprecate fclose() and introduce VIR_{FORCE_}FCLOSE() 2010-11-16 21:13:29 -05:00
xen_hypervisor.h xen-proxy: Remove it entirely and use libvirtd instead 2010-11-08 22:00:35 +01:00
xen_inotify.c bye to close(), welcome to VIR_(FORCE_)CLOSE() 2010-11-09 15:48:48 -05:00
xen_inotify.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
xend_internal.c Fix host CPU counting on unusual NUMA topologies 2010-11-25 10:49:47 +01:00
xend_internal.h vcpu: improve support for setting xen vcpu counts 2010-10-19 10:07:02 -06:00
xm_internal.c Define XML syntax for password expiry 2010-11-09 11:47:13 +00:00
xm_internal.h vcpu: improve support for setting xen vcpu counts 2010-10-19 10:07:02 -06:00
xs_internal.c xen-proxy: Remove it entirely and use libvirtd instead 2010-11-08 22:00:35 +01:00
xs_internal.h xen-proxy: Remove it entirely and use libvirtd instead 2010-11-08 22:00:35 +01:00