On Thu, 8 Jan 2026 23:22:30 GMT, Viktor Klang <[email protected]> wrote:
>> That loop rereads q.array on each iteration, which means it is never stale. >> It's possible ito nstead check for staleness and rescan if so. I just tried >> a version with this, but it's not looking any better. > > Yeah, I was just thinking that the `array`-field is non-volatile so a read > isn't guaranteed to yield anything new unless that read is piggybacking on > some other fence. The t = U.getReferenceAcquire(...) is doing a lot of work here. Every read after it must be freshly accessed. Thanks for the implicit reminder though that I should do almost all those subsequent reads until CAS at once. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2679934255
