RFR: 8366038: Thread::SpinRelease should use Atomic::release_store [v2]
duke
duke at openjdk.org
Wed Sep 3 10:07:48 UTC 2025
On Tue, 2 Sep 2025 08:08:30 GMT, Anton Artemov <duke at openjdk.org> wrote:
>> Hi, please consider the following changes:
>>
>> `Thread::SpinRelease()` uses an `OrderAccess::fence()` to prevent loads and stores from within the critical section to float down out of the section. A full fence is expensive and it is an overkill on most platforms. Instead, one can achieve the same effect with `Atomic::release_store()`.
>>
>> Tested in tiers 1 - 3.
>
> Anton Artemov has updated the pull request incrementally with two additional commits since the last revision:
>
> - Update src/hotspot/share/runtime/thread.cpp
>
> 8366038: Updated comments.
>
> Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com>
> - Update src/hotspot/share/runtime/thread.cpp
>
> 8366038: Updated comments.
>
> Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com>
@toxaart
Your change (at version b6daa43252f31a4069a524d04a81996b1342b389) is now ready to be sponsored by a Committer.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27035#issuecomment-3248580159
More information about the hotspot-runtime-dev
mailing list