[Bug 1358835] Comment bridged from LTC Bugzilla
bugproxy
bugproxy at us.ibm.com
Tue Jan 6 16:31:09 UTC 2015
------- Comment From thierry.fauck at fr.ibm.com 2015-01-06 16:22 EDT-------
The patch sent to the mailing list was :
Subject: [PATCH] numactl-2.0.9~rc5/libnuma.c numa_node_of_cpu()
Date: Tue, 09 Dec 2014 16:44:57 +0100
From: Thierry Fauck at linux.vnet.ibm.com <thierry at linux.vnet.ibm.com>
To: linux-numa at vger.kernel.org, cpw at sgi.com, clameter at sgi.com, lee.schermerhorn at hp.com
Message-ID: <548718F9.9080000 at linux.vnet.ibm.com>
References: <546B74F0.2070101 at linux.vnet.ibm.com>
Could you please take this patch in account as it is needed by couple of distros.
Thanks
-------- Forwarded Message --------
Subject: [PATCH] numactl-2.0.9~rc5/libnuma.c numa_node_of_cpu()
Date: Tue, 18 Nov 2014 17:31:41 +0100
From: Thierry Fauck at linux.vnet.ibm.com <thierry at linux.vnet.ibm.com>
To: ubuntu-devel-discuss at lists.ubuntu.com, Ian Wienand <ianw at debian.org>
linux-numa at vger.kernel.org
Subject: [PATCH] libnuma_node_not_sequential
libnuma.so function numa_node_of_cpu() doesn't use previously
created list of valid nodes but use the entire array indexed with the
maximum number of nodes available on the system.
Fix is to check node is valid before calling numa_node_to_cpus_v2_int()
which check that the cpu belongs to that node.
.
Signed-off-by: Thierry Fauck <thierry at linux.vnet.ibm.com>
---
Index: numactl-2.0.9~rc5/libnuma.c
===================================================================
--- numactl-2.0.9~rc5.orig/libnuma.c
+++ numactl-2.0.9~rc5/libnuma.c
@@ -1403,10 +1403,12 @@ int numa_node_of_cpu(int cpu)
bmp = numa_bitmask_alloc(ncpus);
nnodes = numa_max_node();
for (node = 0; node <= nnodes; node++){
- numa_node_to_cpus_v2_int(node, bmp);
- if (numa_bitmask_isbitset(bmp, cpu)){
- ret = node;
- goto end;
+ if (_getbit(numa_nodes_ptr,node)) {
+ numa_node_to_cpus_v2_int(node, bmp);
+ if (numa_bitmask_isbitset(bmp, cpu)){
+ ret = node;
+ goto end;
+ }
}
}
ret = -1;
--
Thierry Fauck @ linux.vnet.ibm
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to numactl in Ubuntu.
https://bugs.launchpad.net/bugs/1358835
Title:
numa_node_of_cpu() returns warning when cpu_index > 79
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/numactl/+bug/1358835/+subscriptions
More information about the Ubuntu-server-bugs
mailing list