[GHC] #7670: StablePtrs should be organized by generation for efficient minor collections

GHC ghc-devs at haskell.org
Fri Aug 24 00:56:05 UTC 2018


#7670: StablePtrs should be organized by generation for efficient minor
collections
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Runtime System    |              Version:  7.7
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 Ah, now I think I understand what you mean about per-capability tables.
 One hash table for the nursery associated with each capability. Assuming
 it's cheap to determine which nursery the underlying object pointer is in
 (if it is in one), we can perform the lookup/insertion in the matching
 hash table. Since it's rare to create a stable name for an object in
 another thread's nursery, there will be very little contention for the
 nursery table locks.

 Side note: if we do implement the generational scheme, we'll want to edit
 the users' guide to note that it's somewhat more efficient to create a
 stable name for an object very soon after the object is created than to do
 so later.

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


More information about the ghc-tickets mailing list