RFR: 8355627: Don't use ThreadCritical for EventLog list [v2]

Zhengyu Gu zgu at openjdk.org
Mon May 5 13:33:04 UTC 2025


On Mon, 5 May 2025 13:23:48 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> `memory_order_conservative` is [Strong two-way memory barrier](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/atomic.hpp#L47), that means all reads and writes *cannot* float pass the barrier.
>> 
>> If `Atomic::load()` observes a store by conservative order, then precedent reads and writes of the store must have completed.
>
> First of all, nothing on the writer's side can fix the reader's side.
> 
> We're basically relying on volatile load + dependency chain on the reader's side. This is very likely to work, but C++ memory model specialists may find this questionable.

Are we on the same page? which `load` you are talking about?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24954#discussion_r2073455957


More information about the hotspot-dev mailing list