RFR: 8368303: AlwaysAtomicAccesses is excessively strict
Andrew Haley
aph at openjdk.org
Thu Sep 25 09:05:09 UTC 2025
On Wed, 24 Sep 2025 17:36:31 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
> Why do you require `CPU_MULTI_COPY_ATOMIC`? Why can't you unconditionally treat all sub-word/word accesses (naturally aligned) as atomic instead? Isn't that what JVM already guarantees?
This is about the properties of the hardware rather than the JMM, but yes, every CPU that we support in HotSpot is single-copy atomic. Perhaps I was being excessively cautious, and we can just remove `access_is_atomic()`. I was thinking about some hypothetical processor which didn't have this property.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27432#discussion_r2378345511
More information about the hotspot-dev
mailing list