RFR: 8324933: ConcurrentHashTable::statistics_calculate synchronization is expensive [v3]
Coleen Phillimore
coleenp at openjdk.org
Tue Feb 13 15:55:04 UTC 2024
On Tue, 13 Feb 2024 15:22:16 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
>> In the ConcurrentHashTable::statistics_calculate function, we enter and exit a ScopedCS with the global counter for every single bucket. This has showed up to be pretty intense on some machines. We should make the synchronization a bit less intense here. This patch adds simple batching so we synchronize once per 128 buckets instead of every single one.
>
> Erik Österlund has updated the pull request incrementally with one additional commit since the last revision:
>
> Build fix
This seems reasonable, as long as the critical section is held throughout a bucket iteration.
-------------
Marked as reviewed by coleenp (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17629#pullrequestreview-1878335444
More information about the hotspot-dev
mailing list