[GHC] #7602: Threaded RTS performing badly on recent OS X (10.8?)
GHC
ghc-devs at haskell.org
Wed Jan 15 16:41:14 UTC 2014
#7602: Threaded RTS performing badly on recent OS X (10.8?)
-----------------------------------+----------------------------------
Reporter: simonmar | Owner: thoughtpolice
Type: bug | Status: new
Priority: highest | Milestone: 7.8.1
Component: Runtime System | Version: 7.7
Resolution: | Keywords:
Operating System: MacOS X | Architecture: x86_64 (amd64)
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By: 7678
Blocking: | Related Tickets:
-----------------------------------+----------------------------------
Comment (by thoughtpolice):
I investigated Mavericks and talked with Simon about this.
10.9 is problematic. It still emits indirect jumps via a call through
`%rdi` when using `__thread`, so it can't perform a simple direct
load/store to a 'fast' location. You can also use
`pthread_{get,set}specific`, but these are indirect dynamic calls too (and
probably performs even worse.) Furthermore I can't find the source code
for `pthread_getspecific` & co, so it's impossible to check if my 10.8 fix
still works OK.
We decided to:
* Make the runtime use `__thread` on OS X for now. This cleans up the
code, and in the future could be optimized by the compiler/runtime
handling of TLS variables in future versions.
* Document the fact OS X will suffer a performance regression with the
`-threaded` garbage collector.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7602#comment:33>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list