Re: [PATCH] nodeinfo: Don't fail on non-contiguous NUMA topologies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/11/13 18:08, Daniel P. Berrange wrote:
On Thu, Jul 11, 2013 at 04:09:47PM +0200, Peter Krempa wrote:
From: hejia hejia <jiakernel@xxxxxxxxx>

nodeGetFreeMemory and nodeGetCellsFreeMemory assumed that the NUMA nodes
are contiguous and starting from 0. Unfortunately there are machines
that don't match this assumption:

available: 1 nodes (1)
node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
node 1 size: 16340 MB
node 1 free: 11065 MB

Before this patch:
error: internal error Failed to query NUMA free memory
error: internal error Failed to query NUMA free memory for node: 0

After this patch:
Total: 15772580 KiB
0: 0 KiB

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
  src/nodeinfo.c | 18 ++++++------------
  1 file changed, 6 insertions(+), 12 deletions(-)

...


ACK, looking at the libnuma code, the only reasons why numa_node_size64
would return -1, is if the NUMA node does not exist, or the sysfs file
was not parsable as an integer. The latter is basically not going to
happen, so it is reasonable to skip this error reporting unconditionally.

Daniel


Pushed; Thanks.

Peter

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]