On Thu, 14 Nov 2024 13:24:26 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:

>> See the bug for more discussion and reproducer. This PR replaces the ad-hoc 
>> linked list segmented list of arrays. Arrays are easy targets for GC. There 
>> are possible improvements here, most glaring is parallelism that is 
>> currently knee-capped by global synchronization. The synchronization scheme 
>> follows what we have in original code, and I think it is safer to continue 
>> with it right now.
>> 
>> I'll put performance data in a separate comment.
>> 
>> Additional testing:
>>  - [x] Original reproducer improves drastically
>>  - [x] New microbenchmark shows no regression on "churning" tests, which 
>> covers insertion/removal perf
>>  - [x] New microbenchmark shows improvement on Full GC times (crude, but 
>> repeatable), serves as a proxy for reproducer
>>  - [x] `java/lang/ref` tests in release 
>>  - [x] `all` tests in fastdebug
>
> Aleksey Shipilev has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Avoid NPE on empty list, add tests, touchups

This seem to handle excessive allocations when churning around an empty list by 
keeping the head node always allocated. I wonder if there is any worth adding 
some hysteresis if it churns around a multiple of the `NODE_CAPACITY`, by for 
example pooling one node.

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

PR Comment: https://git.openjdk.org/jdk/pull/22043#issuecomment-2476360805

Reply via email to