RFR: 8366038: Thread::SpinRelease should use Atomic::release_store [v2]
Anton Artemov
duke at openjdk.org
Tue Sep 2 08:08:30 UTC 2025
> 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>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27035/files
- new: https://git.openjdk.org/jdk/pull/27035/files/d72316fc..b6daa432
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27035&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27035&range=00-01
Stats: 5 lines in 1 file changed: 0 ins; 3 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/27035.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27035/head:pull/27035
PR: https://git.openjdk.org/jdk/pull/27035
More information about the hotspot-runtime-dev
mailing list