[commit: ghc] master: RTS: Reduce MBLOCK_SPACE_SIZE on AArch64 (38c98e4)
git at git.haskell.org
git at git.haskell.org
Fri Aug 28 16:51:44 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/38c98e4f61a48084995a5347d76ddd024ce1a09c/ghc
>---------------------------------------------------------------
commit 38c98e4f61a48084995a5347d76ddd024ce1a09c
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date: Tue Aug 25 02:07:45 2015 +0000
RTS: Reduce MBLOCK_SPACE_SIZE on AArch64
Commit 0d1a8d09f4 added a two step allocator for 64 bit systems. This
allocator mmaps a huge (1 TB) chunk of memory out of which it does
smaller allocations. On AArch64/Arm64 linux, this mmap was failing
due to the Arm64 Linux kernel parameter CONFIG_ARM64_VA_BITS
defaulting to 39 bits.
Therefore reducing the AArch64 value for MBLOCK_SPACE_SIZE to make
this allocation 1/4 TB while remaining 1 TB for other archs.
Reviewers: ezyang, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1171
GHC Trac Issues: #10682
>---------------------------------------------------------------
38c98e4f61a48084995a5347d76ddd024ce1a09c
rts/sm/HeapAlloc.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/rts/sm/HeapAlloc.h b/rts/sm/HeapAlloc.h
index c914b5d..f2760bd 100644
--- a/rts/sm/HeapAlloc.h
+++ b/rts/sm/HeapAlloc.h
@@ -52,7 +52,12 @@
#ifdef USE_LARGE_ADDRESS_SPACE
extern W_ mblock_address_space_begin;
+#if aarch64_HOST_ARCH
+# define MBLOCK_SPACE_SIZE ((StgWord)1 << 38) /* 1/4 TB */
+#else
# define MBLOCK_SPACE_SIZE ((StgWord)1 << 40) /* 1 TB */
+#endif
+
# define HEAP_ALLOCED(p) ((W_)(p) >= mblock_address_space_begin && \
(W_)(p) < (mblock_address_space_begin + \
MBLOCK_SPACE_SIZE))
More information about the ghc-commits
mailing list