[GHC] #15555: Finish separating the stable name and stable pointer tables
GHC
ghc-devs at haskell.org
Wed Aug 22 00:41:27 UTC 2018
#15555: Finish separating the stable name and stable pointer tables
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone: 8.8.1
Component: Runtime | Version: 8.4.3
System |
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
The stable name table and stable pointer table are both implemented in
`rts/Stable.c`, with their code interleaved. As far as I can tell, they
basically don't share ''anything''—or at least anything that they actually
''should''. They ''do'' share a mutex, which smells like a terrible idea.
Doesn't that just introduce contention between `StableName` and
`StablePtr` operations in different threads? They also share an
initialization function, `initStableTables`, that appears to allocate both
a stable name table and a stable pointer table as soon as either of them
is needed. Unless I'm missing something, there's no point whatsoever in
doing that. So I think we should actually divide `Stable.c` into
`StableName.c` and `StablePtr.c` and give each its own mutex.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15555>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list