Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/6d18141d880d55958c3392f6a7ae621dc33ee5c1 >--------------------------------------------------------------- commit 6d18141d880d55958c3392f6a7ae621dc33ee5c1 Author: Simon Marlow <[email protected]> Date: Thu Dec 1 10:53:28 2011 +0000 Fix a scheduling bug in the threaded RTS The parallel GC was using setContextSwitches() to stop all the other threads, which sets the context_switch flag on every Capability. That had the side effect of causing every Capability to also switch threads, and since GCs can be much more frequent than context switches, this increased the context switch frequency. When context switches are expensive (because the switch is between two bound threads or a bound and unbound thread), the difference is quite noticeable. The fix is to have a separate flag to indicate that a Capability should stop and return to the scheduler, but not switch threads. I've called this the "interrupt" flag. includes/mkDerivedConstants.c | 1 + rts/Capability.c | 10 ++++++++- rts/Capability.h | 46 +++++++++++++++++++++++++++++++++-------- rts/HeapStackCheck.cmm | 3 +- rts/Messages.c | 4 +- rts/Schedule.c | 18 ++++++++++----- rts/Timer.c | 2 +- rts/sm/GC.c | 2 +- 8 files changed, 65 insertions(+), 21 deletions(-) Diff suppressed because of size. To see it, use: git show 6d18141d880d55958c3392f6a7ae621dc33ee5c1 _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
