Opened 3 years ago

Last modified 4 weeks ago

#7670 new bug

StablePtrs should be organized by generation for efficient minor collections

Reported by: ezyang Owned by:
Priority: normal Milestone: 8.0.1
Component: Runtime System Version: 7.7
Keywords: newcomer Cc: remi.turk@…, simonmar
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):


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.

Change History (8)

comment:1 Changed 3 years ago by simonmar

  • difficulty set to Unknown

Right, we could do StablePtrs like mutable lists: keep them in a chain of blocks hanging off each generation. If parallel performance for creating StablePtrs 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).

comment:2 Changed 3 years ago by EyalLotem

Oops! Attached the 7 patches meant for #7674 in this ticket :-( Is there a way to delete these attachments here?

comment:3 Changed 3 years ago by Remi

  • Cc remi.turk@… added

comment:4 Changed 2 years ago by igloo

  • Milestone set to 7.8.1

comment:5 Changed 18 months ago by thoughtpolice

  • Milestone changed from 7.8.3 to 7.10.1

Moving to 7.10.1

comment:6 Changed 10 months ago by thoughtpolice

  • Milestone changed from 7.10.1 to 7.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:7 Changed 4 months ago by ezyang

  • Cc simonmar added
  • Keywords newcomer added

comment:8 Changed 4 weeks ago by thoughtpolice

  • Milestone changed from 7.12.1 to 8.0.1

Milestone renamed

Note: See TracTickets for help on using tickets.