Compare commits
No commits in common. "c8" and "c8s" have entirely different histories.
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,2 +1,5 @@
|
|||||||
SOURCES/hwloc-1.11.9.tar.bz2
|
/hwloc-*.tar.bz2
|
||||||
SOURCES/hwloc-2.2.0.tar.bz2
|
/lstopo.desktop
|
||||||
|
/32ppc-4n4c2c.tar.bz2
|
||||||
|
*.rpm
|
||||||
|
/hwloc.tar.bz2
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
f403351c2ab08e4a1bef24f466a6e992feb8b0b8 SOURCES/hwloc-1.11.9.tar.bz2
|
|
||||||
1b87ff3820b28e718dfdca626a1d27521ea613f6 SOURCES/hwloc-2.2.0.tar.bz2
|
|
74
0001.patch
Normal file
74
0001.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
From: Prarit Bhargava <prarit@redhat.com>
|
||||||
|
|
||||||
|
Subject: linux: fix support for NUMA node0 being offline
|
||||||
|
|
||||||
|
commit 0114c2b0b3e39265e0829eebfff87ac9f4412fe9
|
||||||
|
Author: Brice Goglin <Brice.Goglin@inria.fr>
|
||||||
|
Date: Mon Apr 26 20:35:42 2021 +0200
|
||||||
|
|
||||||
|
linux: fix support for NUMA node0 being offline
|
||||||
|
|
||||||
|
Just like we didn't support offline CPU#0 until commit
|
||||||
|
7bcc273efd50536961ba16d474efca4ae163229b, we need to
|
||||||
|
support node0 being offline as well.
|
||||||
|
It's not clear whether it's a new Linux feature or not,
|
||||||
|
this was reported on a POWER LPAR VM.
|
||||||
|
|
||||||
|
The symptoms are different here because we got no NUMA
|
||||||
|
nodes at all, hence the core hwloc added a default
|
||||||
|
machine-wide node. But this node got marked disallowed
|
||||||
|
by Linux cgroups. Hence load() failed with
|
||||||
|
"Topology does not contain any NUMA node, aborting!"
|
||||||
|
|
||||||
|
We opportunistically assume node0 is online to avoid
|
||||||
|
the overhead in the vast majority of cases. If node0
|
||||||
|
is missing, we parse "online" to find the first node.
|
||||||
|
|
||||||
|
Thanks to Jirka Hladky for the report.
|
||||||
|
|
||||||
|
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
|
||||||
|
|
||||||
|
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
|
||||||
|
|
||||||
|
diff -urNp hwloc-2.2.0.orig/hwloc/topology-linux.c hwloc-2.2.0/hwloc/topology-linux.c
|
||||||
|
--- hwloc-2.2.0.orig/hwloc/topology-linux.c 2021-05-10 14:44:42.690559128 -0400
|
||||||
|
+++ hwloc-2.2.0/hwloc/topology-linux.c 2021-05-10 14:44:57.858982883 -0400
|
||||||
|
@@ -5342,6 +5342,9 @@ static const char *find_sysfs_cpu_path(i
|
||||||
|
|
||||||
|
static const char *find_sysfs_node_path(int root_fd)
|
||||||
|
{
|
||||||
|
+ unsigned first;
|
||||||
|
+ int err;
|
||||||
|
+
|
||||||
|
if (!hwloc_access("/sys/bus/node/devices", R_OK|X_OK, root_fd)
|
||||||
|
&& !hwloc_access("/sys/bus/node/devices/node0/cpumap", R_OK, root_fd))
|
||||||
|
return "/sys/bus/node/devices";
|
||||||
|
@@ -5350,6 +5353,28 @@ static const char *find_sysfs_node_path(
|
||||||
|
&& !hwloc_access("/sys/devices/system/node/node0/cpumap", R_OK, root_fd))
|
||||||
|
return "/sys/devices/system/node";
|
||||||
|
|
||||||
|
+ /* node0 might be offline, fallback to looking at the first online node.
|
||||||
|
+ * online contains comma-separated ranges, just read the first number.
|
||||||
|
+ */
|
||||||
|
+ hwloc_debug("Failed to find sysfs node files using node0, looking at online nodes...\n");
|
||||||
|
+ err = hwloc_read_path_as_uint("/sys/devices/system/node/online", &first, root_fd);
|
||||||
|
+ if (err) {
|
||||||
|
+ hwloc_debug("Failed to find read /sys/devices/system/node/online.\n");
|
||||||
|
+ } else {
|
||||||
|
+ char path[PATH_MAX];
|
||||||
|
+ hwloc_debug("Found node#%u as first online node\n", first);
|
||||||
|
+
|
||||||
|
+ snprintf(path, sizeof(path), "/sys/bus/node/devices/node%u/cpumap", first);
|
||||||
|
+ if (!hwloc_access("/sys/bus/node/devices", R_OK|X_OK, root_fd)
|
||||||
|
+ && !hwloc_access(path, R_OK, root_fd))
|
||||||
|
+ return "/sys/bus/node/devices";
|
||||||
|
+
|
||||||
|
+ snprintf(path, sizeof(path), "/sys/devices/system/node/node%u/cpumap", first);
|
||||||
|
+ if (!hwloc_access("/sys/devices/system/node", R_OK|X_OK, root_fd)
|
||||||
|
+ && !hwloc_access(path, R_OK, root_fd))
|
||||||
|
+ return "/sys/devices/system/node";
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-8
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.other.functional}
|
2
sources
Normal file
2
sources
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
SHA512 (hwloc-1.11.9.tar.bz2) = 59198b460e2acb9ff0f8b06a86116a2ab67515e92035d3ecc1619ddbe42c7dd8991acab9cfe9c7130517238552aa570e3a51d135773ba34fbe343f2dfe48d956
|
||||||
|
SHA512 (hwloc-2.2.0.tar.bz2) = 23efd1d5e2df870ca7a0abb9b3c28c5c5d60dd0cc650ee95d20d5934f48947cbe1d3cf4e90e02b2dc61062ddf7afd67f2c1cf6e1862a48397078d66dd798e850
|
Loading…
Reference in New Issue
Block a user