RFR: 8355627: Don't use ThreadCritical for EventLog list [v2]
Zhengyu Gu
zgu at openjdk.org
Mon May 5 13:48:57 UTC 2025
On Thu, 1 May 2025 06:12:16 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Maybe @shipilev meant `memory_order_release`? Anyway, I guess we don't need to optimize it.
>
> I saw no point in enforcing memory ordering mode here, as it looks like we only did `ThreadCritical` for mutual exclusion. Note that we do not have a matching acquire on list traversals, so seqcst/release on list additions would be incomplete. That only reinforces my original thinking: we are riding on memory ordering given by something else, I'd guess the initialization sequence itself.
>
> But I won't quibble, it is a very minor optimization.
I don't believe we need reader side barrier, given the `conservative` order on writer side. @shipilev any opinion?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24954#discussion_r2073483451
More information about the hotspot-dev
mailing list