RFR: 8299703: GenShen: improvements in card scanning

Y. Srinivas Ramakrishna ysr at openjdk.org
Thu Jan 26 02:04:06 UTC 2023


On Thu, 5 Jan 2023 20:45:00 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

> **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 show 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 a different Extremem workload are being gathered, and will be included. We will also include the impact on the concurrent update refs phase, as well as the overall impact on latency scores.
> 
> **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.

1/25 Update: During testing (with hyperalloc) an intermittent crash was observed which indicated a cross-generational reference pointing into the young collection set that was not evacuated (because it was not found by the marking). This pointer was found when updating cross generational references post-young-evacuation. This could occur for a variety of reasons, including an error in the card-scanning code modified in this PR. I am still in the midst of chasing down this crash (it's difficult to reproduce).

However, please continue with your code reviews.

I'll attach the promised summaries of performance deltas w/SPECjbb & three different Extremem workloads in my next comment.

-------------

PR: https://git.openjdk.org/shenandoah/pull/193


More information about the shenandoah-dev mailing list