[commit: ghc] master: Fix numa001 failure with "too many NUMA nodes" (e0ca7ff)
git at git.haskell.org
git at git.haskell.org
Mon Nov 14 14:43:57 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/e0ca7ff3a9df3f746f0496ae274d669fc14a17dc/ghc
>---------------------------------------------------------------
commit e0ca7ff3a9df3f746f0496ae274d669fc14a17dc
Author: Simon Marlow <marlowsd at gmail.com>
Date: Wed Nov 9 11:02:12 2016 +0000
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.
>---------------------------------------------------------------
e0ca7ff3a9df3f746f0496ae274d669fc14a17dc
rts/posix/OSMem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
index 6e9af3e..febeffb 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
More information about the ghc-commits
mailing list