RFR: 8327042: G1: Parallelism used for redirty logged cards needs better control. [v4]
Ivan Walulya
iwalulya at openjdk.org
Mon Mar 4 11:40:00 UTC 2024
> Please review this change that provides better scaling of the `RedirtyLoggedCardsTask` with high number of worker threads. In the current implementation, the threads contend for access to the Log Buffers through a single BufferNode resulting in a bottleneck as we increase the threads. The cost per card is pretty low, thus the work distribution overhead dominates the task.
>
> The new approach preserves the BufferNodeList states from G1ParScanThreadState, which effectively act as fingers (short cuts) into the list of buffers within `G1RedirtyCardsQueueSet`. We use these BufferNodeList states to distribute BufferNodes for "redirtying" to the worker threads. By creating multiple points of access to the buffers, this method significantly reduces synchronization overheads and eliminates the bottleneck.
>
> I have attached results from the Big Ram Tester microbenchmark on a server that spins up 163 worker threads for the `RedirtyLoggedCardsTask`
>
> 
> 
> 
> 
>
>
> Testing: Tier 1-3
Ivan Walulya has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
- Albert discussion
- Review
- init
-------------
Changes: https://git.openjdk.org/jdk/pull/17963/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17963&range=03
Stats: 54 lines in 5 files changed: 28 ins; 5 del; 21 mod
Patch: https://git.openjdk.org/jdk/pull/17963.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17963/head:pull/17963
PR: https://git.openjdk.org/jdk/pull/17963
More information about the hotspot-gc-dev
mailing list