RFR: 8361099: Shenandoah: Improve heap lock contention by using CAS for memory allocation [v17]

Xiaolong Peng xpeng at openjdk.org
Fri Jan 16 01:20:36 UTC 2026


On Thu, 15 Jan 2026 18:57:28 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:

>> I did run some experiments and didn't see significant difference, I will keep keep current code using PaddedArray, meanwhile keep this conversation open and make a decision based metrics later after I address the other comments.
>
> Here is specjbb results I got, heap size is 8G, 8 cores:
> 
> |                    |               | PaddedArray | Raw array |         |
> | ------------------ | ------------- | ----------- | --------- | ------- |
> | 1st                | Max jOPS      | 17893       | 18092     | 1.11%   |
> |                    | Critical jOPS | 15490       | 15765     | 1.78%   |
> | 2nd                | Max jOPS      | 18219       | 18092     | -0.70% |
> |                    | Critical jOPS | 15625       | 15498     | -0.81% |
> | Average            | Max jOPS      | 18056       | 18092     | 0.20%   |
> |                    | Critical jOPS | 15557.5     | 15631.5   | 0.48%   |
> | Standard deviation | Max jOPS      | 163         | 0       |         |
> |                    | Critical jOPS | 67.5        | 133.5     |         |
> 
> 
> I didn't see huge difference, using raw array tends to be slightly better.

Based on the test result, I have updated the PR to use raw array type instead of PaddedArray.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26171#discussion_r2696511915


More information about the shenandoah-dev mailing list