
On Mon, Jun 16, 2014 at 05:08:24PM +0200, Michal Privoznik wrote:
Not on all hosts the set of NUMA nodes IDs is continuous. This is critical, because our code currently assumes the set doesn't contain holes. For instance in nodeGetFreeMemory() we can see the following pattern:
if ((max_node = virNumaGetMaxNode()) < 0) return 0;
for (n = 0; n <= max_node; n++) { ... }
while it should be something like this:
if ((max_node = virNumaGetMaxNode()) < 0) return 0;
for (n = 0; n <= max_node; n++) { if (!virNumaNodeIsAvailable(n)) continue; ... }
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/libvirt_private.syms | 1 + src/util/virnuma.c | 36 ++++++++++++++++++++++++++++++++++-- src/util/virnuma.h | 1 + 3 files changed, 36 insertions(+), 2 deletions(-)
ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|