diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-03-13 13:51:16 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-03-13 13:51:16 +0000 |
commit | 4e3542263207ae49963811aeb84927027e7bb61d (patch) | |
tree | 90814c02010977694748704fc96bf4347bf2104f /includes | |
parent | 8fda9784f1eff82aa243073fd31b181080be3109 (diff) | |
download | haskell-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 'includes')
-rw-r--r-- | includes/RtsFlags.h | 1 | ||||
-rw-r--r-- | includes/Storage.h | 5 |
2 files changed, 1 insertions, 5 deletions
diff --git a/includes/RtsFlags.h b/includes/RtsFlags.h index db196a975b..5c72bbb3e2 100644 --- a/includes/RtsFlags.h +++ b/includes/RtsFlags.h @@ -183,6 +183,7 @@ struct PAR_FLAGS { rtsBool parGcEnabled; /* enable parallel GC */ rtsBool parGcGen; /* do parallel GC in this generation * and higher only */ + rtsBool parGcLoadBalancing; /* do load-balancing in parallel GC */ }; #endif /* THREADED_RTS */ diff --git a/includes/Storage.h b/includes/Storage.h index f43eb79b76..e541082ee6 100644 --- a/includes/Storage.h +++ b/includes/Storage.h @@ -81,7 +81,6 @@ typedef struct step_ { #if defined(THREADED_RTS) char pad[128]; // make sure the following is // on a separate cache line. - SpinLock sync_todo; // lock for todos SpinLock sync_large_objects; // lock for large_objects // and scavenged_large_objects #endif @@ -93,10 +92,6 @@ typedef struct step_ { unsigned int n_old_blocks; // number of blocks in from-space unsigned int live_estimate; // for sweeping: estimate of live data - bdescr * todos; // blocks waiting to be scavenged - bdescr * todos_last; - unsigned int n_todos; // count of above - bdescr * part_blocks; // partially-full scanned blocks unsigned int n_part_blocks; // count of above |