RFR: Change affiliation representation
Kelvin Nilsen
kdnilsen at openjdk.org
Mon Nov 14 22:18:38 UTC 2022
With generational mode of Shenandoah, each region is associated with OLD, YOUNG, or FREE. During certain marking and update-refs activities, the region affiliation is frequently consulted. In the original implementation, the region affiliation was stored in a field of the ShenandoahHeapRegion object. In this code, we maintain a separate array, indexed by region number, to represent the affiliation of each region. This saves one level of indirection and improves cache locality for looking up the affiliation of each region.
Measurements show significant improvement in throughput. One workload that was configured to perform back-to-back old-gen collections was able to increase the frequency of old-gen collections by almost 5 fold. With a 20-minute Extremem workload using a 48G heap, 20G old-gen, the P95 latency improvement was 0.54% (2.395 ms) and the P99.999 latency improvement was 58.21% (29.195 ms) in comparison to the implementation before this patch.
-------------
Commit messages:
- Fix white space
- Merge remote-tracking branch 'GitFarmBranch/change-affiliation-rep-rebase' into change-affiliation-representation
- Add detail to assert message
- Fix syntax errorx
- Make ShenandoahHeap::is_in_active_generation() mimic previous behavior
- Inline check for in-active-generation
- Force pipeline tests
- Optimize implementation of region affiliation
Changes: https://git.openjdk.org/shenandoah/pull/170/files
Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=170&range=00
Stats: 137 lines in 6 files changed: 89 ins; 33 del; 15 mod
Patch: https://git.openjdk.org/shenandoah/pull/170.diff
Fetch: git fetch https://git.openjdk.org/shenandoah pull/170/head:pull/170
PR: https://git.openjdk.org/shenandoah/pull/170
More information about the shenandoah-dev
mailing list