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

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



On Fri, Mar 12, 2010 at 10:56:13AM -0500, Chris Lalancette wrote:
> Signed-off-by: Chris Lalancette <clalance redhat com>
> ---
>  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 veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


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