RFR: 8299703: GenShen: improvements in card scanning [v6]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Wed Feb 1 00:17:58 UTC 2023
> **Main changes:**
> 1. `process_clusters()` now finds and processes contiguous ranges of dirty cards, skipping over contiguous ranges of clean cards. For reading the diffs, it might be easiest to look at the new code, rather than view the side-by-side diffs.
> 2. the ShenandoahCardCluster class has been extended by a `block_start()` method which returns the first object in a card (which could be co-initial with the card); this method is used by the refactored `process_clusters()` above.
> 3. ShenandoahCardCluster class's `has_object()` method has been renamed `starts_object()` which more closely reflects the API.
> 4. ShenandoahCardStats class has been modified to better suit the way statistics are gathered in the rewritten `process_clusters()`. The larger-grain API should also result in less overhead for gathering the statistics and might (subject to measurement) allow it to be available in product/release builds (if so, that will be done in a separate follow-up ticket).
> 5. Added some const annotations.
>
> **Testing & Implementation Notes:**
> 6. Tested with Extremem and SpecJBB, fastdebug, release, and product builds, with and without verification enabled.
> 7. Preliminary performance data with an Extremem workload showed roughly 17-18% reduction in wall-clock durations of concurrent remembered set scanning across the distribution (p0, p25, p50, p75), p100 (max) was marginally down at 2%. The trend of the change was as expected since the gains are lost when we have a higher frequency of dirty/clean alternations with short dirty/clean runs.
> 8. More performance data with SPECjbb and several different Extremem workloads were gathered, and can be found below, including both phases that use the process_clusters code. See https://github.com/openjdk/shenandoah/pull/193#issuecomment-1405191124 below.
>
> **Acknowledgments**:
> 9. Many thanks to @kdnilsen for feedback on an earlier version of the draft PR, which helped catch a crucial misunderstanding on the role of TAMS and marked objects, and helped fix the error that had been dogging me.
>
> **Epilogue**:
> 10. Further performance improvements are possible, but are deferred for follow-up.
Y. Srinivas Ramakrishna has updated the pull request incrementally with one additional commit since the last revision:
guarantees to asserts (non-production), and warnings (production);
review feedback.
-------------
Changes:
- all: https://git.openjdk.org/shenandoah/pull/193/files
- new: https://git.openjdk.org/shenandoah/pull/193/files/f804468e..46a21b95
Webrevs:
- full: https://webrevs.openjdk.org/?repo=shenandoah&pr=193&range=05
- incr: https://webrevs.openjdk.org/?repo=shenandoah&pr=193&range=04-05
Stats: 16 lines in 2 files changed: 9 ins; 0 del; 7 mod
Patch: https://git.openjdk.org/shenandoah/pull/193.diff
Fetch: git fetch https://git.openjdk.org/shenandoah pull/193/head:pull/193
PR: https://git.openjdk.org/shenandoah/pull/193
More information about the shenandoah-dev
mailing list