#3553: parallel gc suffers badly if one thread is descheduled
-------------------------------+--------------------------------------------
Reporter: simonmar | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.12.2
Component: Runtime System | Version: 6.10.4
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-------------------------------+--------------------------------------------
The parallel GC synchronisation uses pure spinlocks, which leads to a
severe decline in performance when one thread is descheduled. This is the
main cause of the "last core parallel slowdown": using a `-N` value that
matches the number of cores in the machine can be slower than using one
fewer. The effect seems to be quite bad on Linux, reports are that it is
less of an issue on OS X.
Switching to mutexes would help, but it isn't easy because we sometimes
unlock these from a different thread than they were locked from, and
standard mutexes don't let you do that (the locks in question are
`mut_spin` and `gc_spin` in the `GcThread` structure).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3553>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs