diff options
author | Simon Marlow <marlowsd@gmail.com> | 2016-06-11 11:07:14 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2016-06-17 14:52:45 +0100 |
commit | 498ed2664219f7e8f1077f46ad2061aba2f57de4 (patch) | |
tree | 123f66f55096876114b89876e4adf287ad944818 /rts/sm/BlockAlloc.c | |
parent | a7f65b8787b0521397ee09061394425aa69bc6e0 (diff) | |
download | haskell-498ed2664219f7e8f1077f46ad2061aba2f57de4.tar.gz |
NUMA cleanups
- Move the numaMap and nNumaNodes out of RtsFlags to Capability.c
- Add a test to tests/rts
Diffstat (limited to 'rts/sm/BlockAlloc.c')
-rw-r--r-- | rts/sm/BlockAlloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rts/sm/BlockAlloc.c b/rts/sm/BlockAlloc.c index c2859b0c15..6c2e96414e 100644 --- a/rts/sm/BlockAlloc.c +++ b/rts/sm/BlockAlloc.c @@ -467,7 +467,7 @@ uint32_t nodeWithLeastBlocks (void) { uint32_t node = 0, i; uint32_t min_blocks = n_alloc_blocks_by_node[0]; - for (i = 1; i < RtsFlags.GcFlags.nNumaNodes; i++) { + for (i = 1; i < n_numa_nodes; i++) { if (n_alloc_blocks_by_node[i] < min_blocks) { min_blocks = n_alloc_blocks_by_node[i]; node = i; @@ -504,7 +504,7 @@ bdescr* allocLargeChunkOnNode (uint32_t node, W_ min, W_ max) StgWord ln, lnmax; if (min >= BLOCKS_PER_MBLOCK) { - return allocGroup(max); + return allocGroupOnNode(node,max); } ln = log_2_ceil(min); @@ -811,7 +811,7 @@ void returnMemoryToOS(uint32_t n /* megablocks */) StgWord size; // ToDo: not fair, we free all the memory starting with node 0. - for (node = 0; n > 0 && node < RtsFlags.GcFlags.nNumaNodes; node++) { + for (node = 0; n > 0 && node < n_numa_nodes; node++) { bd = free_mblock_list[node]; while ((n > 0) && (bd != NULL)) { size = BLOCKS_TO_MBLOCKS(bd->blocks); @@ -875,7 +875,7 @@ checkFreeListSanity(void) StgWord ln, min; uint32_t node; - for (node = 0; node < RtsFlags.GcFlags.nNumaNodes; node++) { + for (node = 0; node < n_numa_nodes; node++) { min = 1; for (ln = 0; ln < NUM_FREE_LISTS; ln++) { IF_DEBUG(block_alloc, @@ -950,7 +950,7 @@ countFreeList(void) StgWord ln; uint32_t node; - for (node = 0; node < RtsFlags.GcFlags.nNumaNodes; node++) { + for (node = 0; node < n_numa_nodes; node++) { for (ln=0; ln < NUM_FREE_LISTS; ln++) { for (bd = free_list[node][ln]; bd != NULL; bd = bd->link) { total_blocks += bd->blocks; |