diff -u numactl-2.0.10/debian/changelog numactl-2.0.10/debian/changelog --- numactl-2.0.10/debian/changelog +++ numactl-2.0.10/debian/changelog @@ -1,3 +1,10 @@ +numactl (2.0.10-1ubuntu2.1) vivid-proposed; urgency=medium + + * d/p/libnuma-ppc64el-cpu-number-not-contiguous - patch from Thierry FAUCK + (LP: #1358835) + + -- Serge Hallyn Thu, 21 May 2015 15:15:21 -0700 + numactl (2.0.10-1ubuntu2) vivid; urgency=medium * d/patches/from-git-6a7c2cf3-fix-uninitialised-mask.patch: Fix libnuma SEGV diff -u numactl-2.0.10/debian/patches/README numactl-2.0.10/debian/patches/README --- numactl-2.0.10/debian/patches/README +++ numactl-2.0.10/debian/patches/README @@ -1,5 +1,8 @@ patches ======= +add-check-for-return-value-of-node-to-cpus.patch +from-git-6a7c2cf3-fix-uninitialised-mask.patch +libnuma-ppc64el-cpu-number-not-contiguous old patches =========== @@ -22 +25 @@ -001_no-numa.patch : workaround crash on systems with no numa -- fixed 2.0.10-rc2 \ No newline at end of file +001_no-numa.patch : workaround crash on systems with no numa -- fixed 2.0.10-rc2 only in patch2: unchanged: --- numactl-2.0.10.orig/debian/patches/libnuma-ppc64el-cpu-number-not-contiguous.patch +++ numactl-2.0.10/debian/patches/libnuma-ppc64el-cpu-number-not-contiguous.patch @@ -0,0 +1,60 @@ +From 573609fb2711b6c09090cc3fef9a771ae9eb246b Mon Sep 17 00:00:00 2001 +From: Thierry FAUCK - IBM LTC +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 + + modified: libnuma.c +--- + libnuma.c | 22 +++++++++++++--------- + 1 file changed, 13 insertions(+), 9 deletions(-) + +Index: numactl-2.0.10/libnuma.c +=================================================================== +--- numactl-2.0.10.orig/libnuma.c ++++ numactl-2.0.10/libnuma.c +@@ -1276,11 +1276,13 @@ numa_node_to_cpus_v1(int node, unsigned + 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); ++ } + 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 bi + 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; + }