RFR: 8327452: G1: Improve scalability of Merge Log Buffers [v5]
Thomas Schatzl
tschatzl at openjdk.org
Tue Mar 12 11:51:16 UTC 2024
On Mon, 11 Mar 2024 14:19:21 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
>> Hi all,
>>
>> Please review this change to reduce contention on the DCQS. The parallel work done by the worker threads is very small, therefore contention on the DCQS dominates the Merge Log Buffers phase. In this change, we add a sequential phase to distribute the Log Buffers to the worker threads. This removes the DCQS bottleneck in the highly contended case, at a small cost to the cases with low contention.
>>
>> Testing Tier 1-3
>>
>> The graphs below are using Bigramtester at 20gb, "Distribute and Avg Log Buffers" combines the duration of the sequential distribute phase and the avg duration of the parallel `Merge Log Buffers` phase.
>> | Time (ms) | # Cards |
>> | ------------- | ------------- |
>> |  | |
>> | | |
>> |  | |
>> |  |  |
>> |  |  |
>> |  |  |
>
> Ivan Walulya has updated the pull request incrementally with one additional commit since the last revision:
>
> Kim Review
Marked as reviewed by tschatzl (Reviewer).
src/hotspot/share/gc/g1/g1RemSet.cpp line 1313:
> 1311: count += tail->size();
> 1312: cur = tail->next();
> 1313: }
Still good. Looking at this balancing code again, maybe a comment about that part ("// Balance dirty card buffers for better work distribution.") or factoring this out into a helper method for documentation purposes would be nice.
It just feels quite a bit of code in a constructor, but just a comment what this is doing is just fine. Or just ignore if you feel it is obvious.
-------------
PR Review: https://git.openjdk.org/jdk/pull/18134#pullrequestreview-1930829966
PR Review Comment: https://git.openjdk.org/jdk/pull/18134#discussion_r1521322464
More information about the hotspot-gc-dev
mailing list