diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-10-31 13:07:18 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-10-31 13:07:18 +0000 |
commit | f2ca6deece1ed1724efdd6d2293dc7642059b2f2 (patch) | |
tree | 7f08b2b0e7043568bbf9f02dad6e2da7a970efe1 /rts/sm/BlockAlloc.c | |
parent | d5bd3e829c47c03157cf41cad581d2df44dfd81b (diff) | |
download | haskell-f2ca6deece1ed1724efdd6d2293dc7642059b2f2.tar.gz |
Initial parallel GC support
eg. use +RTS -g2 -RTS for 2 threads. Only major GCs are parallelised,
minor GCs are still sequential. Don't use more threads than you
have CPUs.
It works most of the time, although you won't see much speedup yet.
Tuning and more work on stability still required.
Diffstat (limited to 'rts/sm/BlockAlloc.c')
-rw-r--r-- | rts/sm/BlockAlloc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rts/sm/BlockAlloc.c b/rts/sm/BlockAlloc.c index 1c4899e37e..8b8595606b 100644 --- a/rts/sm/BlockAlloc.c +++ b/rts/sm/BlockAlloc.c @@ -310,7 +310,8 @@ allocGroup (nat n) { bdescr *bd, *rem; - ASSERT_SM_LOCK(); + // Todo: not true in multithreaded GC, where we use allocBlock_sync(). + // ASSERT_SM_LOCK(); if (n == 0) barf("allocGroup: requested zero blocks"); @@ -439,7 +440,8 @@ freeGroup(bdescr *p) { nat p_on_free_list = 0; - ASSERT_SM_LOCK(); + // Todo: not true in multithreaded GC + // ASSERT_SM_LOCK(); ASSERT(p->free != (P_)-1); |