summaryrefslogtreecommitdiff
path: root/SUBMAKEHELP
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-12-01 10:53:28 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-12-01 11:29:53 +0000
commit6d18141d880d55958c3392f6a7ae621dc33ee5c1 (patch)
treeedd5607a50a92ffad4707cef792a06246b5b41e4 /SUBMAKEHELP
parent1d012e31577951ff5fe74d0277fabdb08c27929d (diff)
downloadhaskell-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