RFR: 8341544: Restore fence() in Mutex

David Holmes dholmes at openjdk.org
Thu May 15 11:47:30 UTC 2025


On Tue, 13 May 2025 12:43:20 GMT, Anton Artemov <duke at openjdk.org> wrote:

> > As per JBS comment I still think we only need to add the missing storeload part of the full-fence, to complement the existing barriers the platform sync primitives provide.
> 
> @dholmes-ora Each and every implementation of storeload() is either calling fence() or is calling the same method as fence(), what exactly do you mean by the missing part?

It may be that the implementation on most platforms is equivalent, but semantically given the memory barriers present in the native sync operations the part missing to make them perform a "full fence" is the "storeload" part.

I'm not hung up on this, but it seemed from JBS that there was some agreement that we did not need an explicit orderAccess::fence to achieve the goal of having a full fence in effect.

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

PR Comment: https://git.openjdk.org/jdk/pull/25033#issuecomment-2879931323


More information about the hotspot-runtime-dev mailing list