mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-20 11:48:28 -06:00
Only use the numa functions when they are available.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
This commit is contained in:
parent
83988bd43b
commit
74383bfc42
@ -160,10 +160,12 @@ int linuxNodeInfoCPUPopulate(virConnectPtr conn, FILE *cpuinfo,
|
||||
nodeinfo->cpus = 0;
|
||||
nodeinfo->mhz = 0;
|
||||
nodeinfo->cores = 1;
|
||||
if (numa_available() < 0)
|
||||
nodeinfo->nodes = 1;
|
||||
else
|
||||
|
||||
nodeinfo->nodes = 1;
|
||||
#if HAVE_NUMACTL
|
||||
if (numa_available() >= 0)
|
||||
nodeinfo->nodes = numa_max_node() + 1;
|
||||
#endif
|
||||
|
||||
/* NB: It is impossible to fill our nodes, since cpuinfo
|
||||
* has no knowledge of NUMA nodes */
|
||||
|
Loading…
Reference in New Issue
Block a user