RFR: 8323807: Async UL: Add a stalling mode to async UL [v2]

Johan Sjölen jsjolen at openjdk.org
Tue Apr 2 08:48:06 UTC 2024


On Thu, 28 Mar 2024 06:40:54 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Johan Sjölen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 41 additional commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'origin/master' into ul-async-producer-consumer-take2
>>  - Missing N
>>  - Move constructors out of header file
>>  - Style
>>  - Correctly implement stalling
>>  - Missed one
>>  - Fix lossy conversions in tests
>>  - Merge remote-tracking branch 'origin/master' into ul-async-producer-consumer-take2
>>  - Only include sys/mman on Linux
>>  - Revert back to original Linux impl
>>  - ... and 31 more: https://git.openjdk.org/jdk/compare/67db29d8...8c4ced0f
>
> src/hotspot/share/logging/circularStringBuffer.cpp line 94:
> 
>> 92: size_t CircularStringBuffer::used() {
>> 93:   size_t h = Atomic::load(&head);
>> 94:   size_t t = Atomic::load(&tail);
> 
> I assume these are `Atomic::load` because this code can be called without either the read lock or write lock? If so then the locked updates technically need to be `Atomic::store`.

I'll change them to use `Atomic::store`, but shouldn't releasing the lock cause a full memory fence and therefore prevent the store from being delayed? Or is there something else that I'm missing?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17757#discussion_r1547421308


More information about the hotspot-runtime-dev mailing list