mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -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->cpus = 0;
|
||||||
nodeinfo->mhz = 0;
|
nodeinfo->mhz = 0;
|
||||||
nodeinfo->cores = 1;
|
nodeinfo->cores = 1;
|
||||||
if (numa_available() < 0)
|
|
||||||
nodeinfo->nodes = 1;
|
nodeinfo->nodes = 1;
|
||||||
else
|
#if HAVE_NUMACTL
|
||||||
|
if (numa_available() >= 0)
|
||||||
nodeinfo->nodes = numa_max_node() + 1;
|
nodeinfo->nodes = numa_max_node() + 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* NB: It is impossible to fill our nodes, since cpuinfo
|
/* NB: It is impossible to fill our nodes, since cpuinfo
|
||||||
* has no knowledge of NUMA nodes */
|
* has no knowledge of NUMA nodes */
|
||||||
|
Loading…
Reference in New Issue
Block a user