[libvirt] [PATCH 0/2] Don't rely on cached topology information

Andrea Bolognani abologna at redhat.com
Wed Apr 29 07:53:29 UTC 2015

Currently, if CPUs are brought online or offline during the lifetime of
a libvirtd instance, the output of commands such as `virsh capabilities'
will not reflect the actual topology, eg. displaying empty <cpu> tags
for CPUs that have been brought offline and not displaying at all CPUs
that have been brought online.

This happens because the list of CPUs in a node is queried using
libnuma, which maintains its internal cache.

This patch changes the code so that the required information is
extracted from sysfs instead, making the data displayed to the user
always fresh.

Andrea Bolognani (2):
  nodeinfo: Export nodeGetCPUValue() after renaming it.
  numa: Rewrite virNumaGetNodeCPUs() to query CPUs dynamically.

 src/libvirt_private.syms |   1 +
 src/nodeinfo.c           |  28 +++++----
 src/nodeinfo.h           |   6 +-
 src/util/virnuma.c       | 158 ++++++++++++++++++++++++-----------------------
 4 files changed, 102 insertions(+), 91 deletions(-)


More information about the libvir-list mailing list