提交 74383bfc 编写于 作者: C Chris Lalancette

Only use the numa functions when they are available.

Signed-off-by: NChris Lalancette <clalance@redhat.com>
上级 83988bd4
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册