[Bug 1358835] Comment bridged from LTC Bugzilla

bugproxy bugproxy at us.ibm.com
Thu Aug 20 17:02:50 UTC 2015


------- Comment From thierry.fauck at fr.ibm.com 2015-03-05 10:05 EDT-------
Verified:
gcc test.c -ldl -o test
ubuntu at vm19:~$ ./test 80
80
cpu 80 belongs to node 2
ubuntu at vm19:~$ numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
node 0 size: 969 MB
node 0 free: 445 MB
node 1 cpus: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
node 1 size: 1022 MB
node 1 free: 777 MB
node 2 cpus: 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
node 2 size: 1022 MB
node 2 free: 37 MB
node 3 cpus: 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
node 3 size: 1017 MB
node 3 free: 907 MB
node distances:
node   0   1   2   3
0:  10  40  40  40
1:  40  10  40  40
2:  40  40  10  40
3:  40  40  40  10
ubuntu at vm19:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

------- Comment From mainamdar at in.ibm.com 2015-03-19 05:43 EDT-------
The test described in the bug fails in Ubuntu 14.04.2.

The following packages were tried as well: libnuma1 2.0.9~rc5-1ubuntu3
and numactl  2.0.9~rc5-1ubuntu3

In all cases the test failed. The efix for 14.04.1 provided by Thierry
Fauck worked but it was not used  in 14.04.02

------- Comment From mainamdar at in.ibm.com 2015-03-25 10:41 EDT-------
Any updates on this?

------- Comment From thierry.fauck at fr.ibm.com 2015-04-08 07:54 EDT-------
Commit 573609fb2711b6c09090cc3fef9a771ae9eb246b sent to maintainers

>From 573609fb2711b6c09090cc3fef9a771ae9eb246b Mon Sep 17 00:00:00 2001
From: Thierry FAUCK - IBM LTC <thierry at linux.vnet.ibm.com>
Date: Tue, 7 Apr 2015 17:53:34 +0200
Subject: [PATCH] libnuma.so On ppc64el, cpu number are not contigous

Commit 32075635db57c3d5efe12f8fb569af857e01ccad issuea warning message
/sys not mounted when it find a non existent cpu number, and that's the
default for multinode on ppc64el bare metal installed system. This patch
removes the message when the /sys entry doesn't exist, but use the return
code.

Signed-off-by: Thierry FAUCK - IBM LTC <thierry at linux.vnet.ibm.com>

modified:   libnuma.c
---
libnuma.c |   22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/libnuma.c b/libnuma.c
index 3717d5b..98aa10f 100644
--- a/libnuma.c
+++ b/libnuma.c
@@ -1276,11 +1276,13 @@ numa_node_to_cpus_v1(int node, unsigned long *buffer, int bufferlen)
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
-               numa_warn(W_nosysfs2,
-                  "/sys not mounted or invalid. Assuming one node: %s",
+               if (f) {
+                       numa_warn(W_nosysfs2,
+                         "/sys not mounted or invalid. Assuming one node: %s",
strerror(errno));
-               numa_warn(W_nosysfs2,
-                  "(cannot open or correctly parse %s)", fn);
+                       numa_warn(W_nosysfs2,
+                         "(cannot open or correctly parse %s)", fn);
+               }
bitmask.maskp = (unsigned long *)mask;
bitmask.size  = buflen_needed * 8;
numa_bitmask_setall(&bitmask);
@@ -1355,11 +1357,13 @@ numa_node_to_cpus_v2(int node, struct bitmask *buffer)
sprintf(fn, "/sys/devices/system/node/node%d/cpumap", node);
f = fopen(fn, "r");
if (!f || getdelim(&line, &len, '\n', f) < 1) {
-               numa_warn(W_nosysfs2,
-                  "/sys not mounted or invalid. Assuming one node: %s",
-                         strerror(errno));
-               numa_warn(W_nosysfs2,
-                  "(cannot open or correctly parse %s)", fn);
+               if (f) {
+                       numa_warn(W_nosysfs2,
+                         "/sys not mounted or invalid. Assuming one node: %s",
+                         strerror(errno));
+                       numa_warn(W_nosysfs2,
+                         "(cannot open or correctly parse %s)", fn);
+               }
numa_bitmask_setall(mask);
err = -1;
}
--
1.7.9.5

------- Comment From amdavis at us.ibm.com 2015-06-01 20:02 EDT-------
Has this patch been accepted by maintainers?   The Canonical status is fix released.  Is there a fix that should be pulled and tested?

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