diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-12-01 10:53:28 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-12-01 11:29:53 +0000 |
commit | 6d18141d880d55958c3392f6a7ae621dc33ee5c1 (patch) | |
tree | edd5607a50a92ffad4707cef792a06246b5b41e4 /SUBMAKEHELP | |
parent | 1d012e31577951ff5fe74d0277fabdb08c27929d (diff) | |
download | haskell-6d18141d880d55958c3392f6a7ae621dc33ee5c1.tar.gz |
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.
Diffstat (limited to 'SUBMAKEHELP')
0 files changed, 0 insertions, 0 deletions