RFR: 8233697: CHT: Iteration parallelization [v3]

Thomas Schatzl tschatzl at openjdk.org
Fri Oct 21 06:46:59 UTC 2022


On Thu, 20 Oct 2022 20:38:02 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:

>> Hi,
>> 
>> Please review this change to add parallel iteration of the ConcurrentHashTable. The iteration should be done during a safepoint without concurrent modifications to the ConcurrentHashTable.
>> 
>> Usecase is in parallelizing the merging of large remsets for G1.
>> 
>> Some background: The problem is that particularly during (G1) mixed gc it happens that the distribution of contents in the CHT is very unbalanced - young gen regions have a very small remembered set (little work), and old gen regions very large ones (much work).
>> 
>> Since the current work distribution is based on whole remembered sets (i.e. CHTs), this makes for a very unbalanced merge remsets phase in G1 when you have quite a bit more than the number of old gen regions threads at your disposal.
>> This negatively impacts pause time predictions (and obviously pause times are longer than necessary as many threads are idling to wait for the phase to complete).
>> 
>> This change only adds the infrastructure code in the CHT, there will be a follow-up with G1 changes.
>> 
>> Testing: tier 1-3
>
> Ivan Walulya has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - move BucketsClaimer declaration
>  - move BucketsClaimer declaration

Changes requested by tschatzl (Reviewer).

src/hotspot/share/utilities/concurrentHashTable.inline.hpp line 1358:

> 1356:     }
> 1357:     return false;
> 1358:   }

Minor nit: A better place for this method is probably `InternalTableClaimer`; then you can also probably improve encapsulation (visibility) of the members if you want, but I'm good with keeping everything public (as default for a struct) for this helper class.
I did not think through the suggestion earlier.

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

PR: https://git.openjdk.org/jdk/pull/10759


More information about the hotspot-dev mailing list