RFR: Change affiliation representation [v2]
Kelvin Nilsen
kdnilsen at openjdk.org
Wed Nov 16 14:43:08 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.
Kelvin Nilsen has updated the pull request incrementally with six additional commits since the last revision:
- Add comment to clarify that _affiliation required for non-generational
- Add assertions to clarify locks required for setting affiliation
- Adjust asserts for heap lock
- Undo change to _affiliations add assertion to clarify heap lock
- Only initialize _affiliations if mode is generational
- Only initialize _affiiations in generational mode
-------------
Changes:
- all: https://git.openjdk.org/shenandoah/pull/170/files
- new: https://git.openjdk.org/shenandoah/pull/170/files/1033b0cd..15a0825f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=shenandoah&pr=170&range=01
- incr: https://webrevs.openjdk.org/?repo=shenandoah&pr=170&range=00-01
Stats: 56 lines in 5 files changed: 54 ins; 0 del; 2 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