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 /rts/sm/GCUtils.h | |
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 'rts/sm/GCUtils.h')
-rw-r--r-- | rts/sm/GCUtils.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rts/sm/GCUtils.h b/rts/sm/GCUtils.h index 6948b2f1db..e71f4374fb 100644 --- a/rts/sm/GCUtils.h +++ b/rts/sm/GCUtils.h @@ -17,10 +17,12 @@ bdescr *allocBlock_sync(void); void freeChain_sync(bdescr *bd); void push_scanned_block (bdescr *bd, step_workspace *ws); -bdescr *grab_todo_block (step_workspace *ws); StgPtr todo_block_full (nat size, step_workspace *ws); StgPtr alloc_todo_block (step_workspace *ws, nat size); +bdescr *grab_local_todo_block (step_workspace *ws); +bdescr *steal_todo_block (nat s); + // Returns true if a block is partially full. This predicate is used to try // to re-use partial blocks wherever possible, and to reduce wastage. // We might need to tweak the actual value. |