summaryrefslogtreecommitdiff
path: root/rts/parallel
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-03-13 13:51:16 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-03-13 13:51:16 +0000
commit4e3542263207ae49963811aeb84927027e7bb61d (patch)
tree90814c02010977694748704fc96bf4347bf2104f /rts/parallel
parent8fda9784f1eff82aa243073fd31b181080be3109 (diff)
downloadhaskell-4e3542263207ae49963811aeb84927027e7bb61d.tar.gz
Use work-stealing for load-balancing in the GC
New flag: "+RTS -qb" disables load-balancing in the parallel GC (though this is subject to change, I think we will probably want to do something more automatic before releasing this). To get the "PARGC3" configuration described in the "Runtime support for Multicore Haskell" paper, use "+RTS -qg0 -qb -RTS". The main advantage of this is that it allows us to easily disable load-balancing altogether, which turns out to be important in parallel programs. Maintaining locality is sometimes more important that spreading the work out in parallel GC. There is a side benefit in that the parallel GC should have improved locality even when load-balancing, because each processor prefers to take work from its own queue before stealing from others.
Diffstat (limited to 'rts/parallel')
-rw-r--r--rts/parallel/WSDeque.c4
-rw-r--r--rts/parallel/WSDeque.h4
2 files changed, 0 insertions, 8 deletions
diff --git a/rts/parallel/WSDeque.c b/rts/parallel/WSDeque.c
index ced6c95ec6..acecb85e5f 100644
--- a/rts/parallel/WSDeque.c
+++ b/rts/parallel/WSDeque.c
@@ -43,8 +43,6 @@
#include "WSDeque.h"
#include "SMP.h" // for cas
-#if defined(THREADED_RTS)
-
#define CASTOP(addr,old,new) ((old) == cas(((StgPtr)addr),(old),(new)))
/* -----------------------------------------------------------------------------
@@ -285,5 +283,3 @@ pushWSDeque (WSDeque* q, void * elem)
ASSERT_WSDEQUE_INVARIANTS(q);
return rtsTrue;
}
-
-#endif
diff --git a/rts/parallel/WSDeque.h b/rts/parallel/WSDeque.h
index c25467145e..d85567c38a 100644
--- a/rts/parallel/WSDeque.h
+++ b/rts/parallel/WSDeque.h
@@ -9,8 +9,6 @@
#ifndef WSDEQUE_H
#define WSDEQUE_H
-#if defined(THREADED_RTS)
-
typedef struct WSDeque_ {
// Size of elements array. Used for modulo calculation: we round up
// to powers of 2 and use the dyadic log (modulo == bitwise &)
@@ -125,6 +123,4 @@ discardElements (WSDeque *q)
// pool->topBound = pool->top;
}
-#endif // THREADED_RTS
-
#endif // WSDEQUE_H