Mon Jan 12 04:10:24 PST 2009  Simon Marlow <[email protected]>
  * Keep the remembered sets local to each thread during parallel GC
  This turns out to be quite vital for parallel programs:
  
    - The way we discover which threads to traverse is by finding
      dirty threads via the remembered sets (aka mutable lists).
  
    - A dirty thread will be on the remembered set of the capability
      that was running it, and we really want to traverse that thread's
      stack using the GC thread for the capability, because it is in
      that CPU's cache.  If we get this wrong, we get penalised badly by
      the memory system.
  
  Previously we had per-capability mutable lists but they were
  aggregated before GC and traversed by just one of the GC threads.
  This resulted in very poor performance particularly for parallel
  programs with deep stacks.
  
  Now we keep per-capability remembered sets throughout GC, which also
  removes a lock (recordMutableGen_sync).

    M ./includes/Storage.h -32 +10
    M ./rts/Capability.c +3
    M ./rts/Capability.h -3 +5
    M ./rts/Stats.c -1
    M ./rts/Updates.h -1 +1
    M ./rts/sm/Compact.c +9
    M ./rts/sm/GC.c -38 +50
    M ./rts/sm/GCThread.h +8
    M ./rts/sm/GCUtils.h +19
    M ./rts/sm/Scav.c -17 +32
    M ./rts/sm/Scav.h -2 +4
    M ./rts/sm/Storage.c -2 +1

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20090112121024-12142-5e1f5762b5ba553388493e7057132e4e2a5155a8.gz

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to