diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-12-26 16:44:13 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-12-30 06:53:23 -0500 |
commit | 9ce3ba68ad30d2173983be309ecfc08737e1dc38 (patch) | |
tree | da9fdbd8ab65c6c18d28d53f444f1e6dfedff5d6 /rts | |
parent | fdeffa5e56abccc64df750ba67a39b4af99adac5 (diff) | |
download | haskell-9ce3ba68ad30d2173983be309ecfc08737e1dc38.tar.gz |
rts: Fix --debug-numa mode under Docker
As noted in #17606, Docker disallows the get_mempolicy syscall by
default. This caused numerous tests to fail under CI in the `debug_numa`
way. Avoid this by disabling the NUMA probing logic when --debug-numa is
in use, instead setting n_numa_nodes in RtsFlags.c.
Fixes #17606.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Capability.c | 2 | ||||
-rw-r--r-- | rts/RtsFlags.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/rts/Capability.c b/rts/Capability.c index 91d4683f73..c112349925 100644 --- a/rts/Capability.c +++ b/rts/Capability.c @@ -350,6 +350,8 @@ void initCapabilities (void) for (i = 0; i < MAX_NUMA_NODES; i++) { numa_map[i] = 0; } + } else if (RtsFlags.DebugFlags.numa) { + // n_numa_nodes was set by RtsFlags.c } else { uint32_t nNodes = osNumaNodes(); if (nNodes > MAX_NUMA_NODES) { diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 2e11399aab..2c5f69a76f 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -990,6 +990,7 @@ error = true; RtsFlags.GcFlags.numa = true; RtsFlags.DebugFlags.numa = true; RtsFlags.GcFlags.numaMask = (1<<nNodes) - 1; + n_numa_nodes = nNodes; } } #endif |