RFR: 8266557: assert(SafepointMechanism::local_poll_armed(_handshakee)) failed: Must be [v3]
Patricio Chilano Mateo
pchilanomate at openjdk.java.net
Thu Jun 3 16:44:46 UTC 2021
On Thu, 3 Jun 2021 16:06:09 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> Ok, although since all it matters for is_empty() is that there is at least one element in the queue and to remove the last element we always use a CAS it should be okay. I now realize that we could have also removed the operation from the queue as before if it is not the last one, so that would save the second traversal of the queue. But I see that if we want to maintain the invariant "If the handshake operation is not completed it must be on at least one queue" then we need to do it like this.
>
> Did you guys decide the comment needed updating or not?
> I can't figure that out from the above.
Maybe it should be added in the comment that the fence is also used to prevent removing of the operation to float above marking the operation as completed so we keep the invariant: "If the handshake operation is not completed it must be on at least one queue".
-------------
PR: https://git.openjdk.java.net/jdk/pull/3973
More information about the hotspot-runtime-dev
mailing list