[GHC] #9075: Per-thread weak pointer list (remove global lock on mkWeak#)

GHC ghc-devs at haskell.org
Sun May 4 08:02:51 UTC 2014


#9075: Per-thread weak pointer list (remove global lock on mkWeak#)
------------------------------+--------------------------------------------
       Reporter:  ezyang      |             Owner:  simonmar
           Type:  bug         |            Status:  new
       Priority:  low         |         Milestone:
      Component:  Runtime     |           Version:  7.9
  System                      |  Operating System:  Unknown/Multiple
       Keywords:  easy        |   Type of failure:  Runtime performance bug
   Architecture:              |         Test Case:
  Unknown/Multiple            |          Blocking:
     Difficulty:  Unknown     |
     Blocked By:              |
Related Tickets:              |
------------------------------+--------------------------------------------
 Currently, we have to take out the storage manager lock when a weak
 pointer is allocated. If you're making a lot of weak pointers, this could
 become a bottleneck. We should maintain a per-thread weak pointer list per
 generation, so that we don't have to take out a lock.

 Marking priority as low since I don't think anyone actually is trying to
 allocate tons of weak pointers on multiple threads, but I think this
 optimization should be relatively cheap. Probably a good starter ticket.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9075>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list