RFR: 8324933: ConcurrentHashTable::statistics_calculate synchronization is expensive [v3]

Thomas Schatzl tschatzl at openjdk.org
Wed Feb 14 12:24:03 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

lgtm. A comment why we need to do the batched iteration (without looking at versioning system logs) would be nice.

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

Marked as reviewed by tschatzl (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17629#pullrequestreview-1880141210


More information about the hotspot-dev mailing list