-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b19
At bootstrap we create a SparsePRT for each region, which uses C-heap allocated storage in RSHashTable. These can be lazily allocated with no negative effect on pause times:
Proposed implementation is simple:
- Allocate a static, empty RSHashTable and assign a reference to that to every new SparsePRT.
- When adding a card - we piggyback on existing expand logic to allocate a new RSHashTable at the expected InitialCapacity
This allows logic that checks for cards etc to remain oblivious to the lazy initialization (potentially even a bit faster, since scanning the empty RSHashTables will take fewer instructions, and more likely hit cache).
Experiment shows a reduction in the per-region overhead of ~10% with an improvement to #insns retired by a Hello World by ~0.4% on my system. Effect scales up or down based on max # regions.
Proposed implementation is simple:
- Allocate a static, empty RSHashTable and assign a reference to that to every new SparsePRT.
- When adding a card - we piggyback on existing expand logic to allocate a new RSHashTable at the expected InitialCapacity
This allows logic that checks for cards etc to remain oblivious to the lazy initialization (potentially even a bit faster, since scanning the empty RSHashTables will take fewer instructions, and more likely hit cache).
Experiment shows a reduction in the per-region overhead of ~10% with an improvement to #insns retired by a Hello World by ~0.4% on my system. Effect scales up or down based on max # regions.