[GHC] #7602: Threaded RTS performing badly on recent OS X (10.8?)
GHC
cvs-ghc at haskell.org
Mon Feb 11 00:14:41 CET 2013
#7602: Threaded RTS performing badly on recent OS X (10.8?)
-------------------------------+--------------------------------------------
Reporter: simonmar | Owner: thoughtpolice
Type: bug | Status: new
Priority: normal | Milestone: _|_
Component: Runtime System | Version: 7.7
Keywords: | Os: MacOS X
Architecture: x86_64 (amd64) | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: 7678 | Blocking:
Related: |
-------------------------------+--------------------------------------------
Comment(by simonmar):
Ok, so an inline `pthread_getspecific` is good, but it's still not ideal,
because the compiler can't see the code inside the inline asm. Multiple
references to the TLS variable should not cause repeated reads, but with
the inline `pthread_getspecific`, they will.
However, this can be worked around in the code by loading the TLS variable
into a local once at the start of the function. I wouldn't object to
this, it's less invasive than passing around the TLS variable as a
parameter everywhere. But we should peer at the asm before and after to
make sure it's doing what we expect.
Stealing the WebKit-reserved slot would probably work for now, until some
library developer has the same idea, and then we have a bizarre bug
waiting to happen. I suppose I slightly prefer to use gcc for now, since
we know it works, has good performance, and doesn't have this infelicity.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7602#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list