Re: [libvirt] [PATCH] Only use the numa functions when they are available.

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

 



On Fri, Mar 12, 2010 at 10:56:13AM -0500, Chris Lalancette wrote:
> Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx>
> ---
>  src/nodeinfo.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/src/nodeinfo.c b/src/nodeinfo.c
> index 8d7e055..bf57517 100644
> --- a/src/nodeinfo.c
> +++ b/src/nodeinfo.c
> @@ -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 */

  Oops, ACK, please push !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
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]