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

#7670: StablePtrs should be organized by generation for efficient minor collections -----------------------------+---------------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Component: Runtime System Version: 7.7 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- Currently, stable pointers are all in one giant pointer table (see markStablePtrTable); this results in pretty bad GC behavior when you create a lot of stable pointers (Peaker has a test-case which he thinks is suffering due to repeated traversal of the stable pointers list.) We should partition them up into generations like we do for mutable lists. There might be some trickiness keeping the table up-to-date after GCs. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7670 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7670: StablePtrs should be organized by generation for efficient minor collections ---------------------------------+------------------------------------------ Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.7 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by simonmar): * difficulty: => Unknown Comment: Right, we could do `StablePtr`s like mutable lists: keep them in a chain of blocks hanging off each generation. If parallel performance for creating `StablePtr`s is important you might even want to have per- Capability lists (it's not that hard, actually). During a GC: * traverse the stable ptr lists for each generation we are collecting (only) * evacuate the object * place the pointer into the stable ptr list for the generation that the object is now in (found by `Bdescr(p)->gen_no`) That is, for generations we collect, we throw away the old stable ptr lists and create new ones. (this is just like the mutable lists). -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7670#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7670: StablePtrs should be organized by generation for efficient minor collections ---------------------------------+------------------------------------------ Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.7 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Comment(by EyalLotem): Oops! Attached the 7 patches meant for #7674 in this ticket :-( Is there a way to delete these attachments here? -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7670#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7670: StablePtrs should be organized by generation for efficient minor collections ---------------------------------+------------------------------------------ Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.7 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by Remi): * cc: remi.turk@… (added) -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7670#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7670: StablePtrs should be organized by generation for efficient minor collections ---------------------------------+------------------------------------------ Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Runtime System | Version: 7.7 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by igloo): * milestone: => 7.8.1 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7670#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC