summaryrefslogtreecommitdiff
path: root/rts/posix
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2016-11-09 11:02:12 +0000
committerSimon Marlow <marlowsd@gmail.com>2016-11-14 14:43:35 +0000
commite0ca7ff3a9df3f746f0496ae274d669fc14a17dc (patch)
tree3e61877cd4a0ff7e9b8dce8dd351397fdef4c5cf /rts/posix
parent034e01e4b0a92240883b125e2362457932e785cf (diff)
downloadhaskell-e0ca7ff3a9df3f746f0496ae274d669fc14a17dc.tar.gz
Fix numa001 failure with "too many NUMA nodes"
It seems that recent versions of the Linux kernel are using larger NUMA bitmasks; I see 1024 on my laptop running a 4.6.5 kernel. This causes the NUMA tests to fail. I'm fixing it to only fail if we have that many actual *nodes*, rather than failing if the size of the mask is too big.
Diffstat (limited to 'rts/posix')
-rw-r--r--rts/posix/OSMem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
index 6e9af3e9c3..febeffbd98 100644
--- a/rts/posix/OSMem.c
+++ b/rts/posix/OSMem.c
@@ -585,8 +585,8 @@ StgWord osNumaMask(void)
#if HAVE_LIBNUMA
struct bitmask *mask;
mask = numa_get_mems_allowed();
- if (mask->size > sizeof(StgWord)*8) {
- barf("Too many NUMA nodes");
+ if (osNumaNodes() > sizeof(StgWord)*8) {
+ barf("osNumaMask: too many NUMA nodes (%d)", osNumaNodes());
}
return mask->maskp[0];
#else