Query regarding ordering in G1 post-write barrier
Andrew Dinn
adinn at redhat.com
Mon Jul 20 14:14:42 UTC 2015
On 20/07/15 14:44, Thomas Schatzl wrote:
>
> . . .
>
> Refinement threads and mutator threads take a lock to push and pop a new
> buffer (in SharedRuntime::g1_wb_post) to and from the buffer queue,
> which means that there is at least one cmpxchg/synchronization between
> the thread pushing the buffer and the refinement thread popping it.
>
> . . .
>
> Note that GC threads do access the buffers, but there is a safepointing
> operation between the accesses.
>
> That should cover the eventualities. You can now tell us where I am
> wrong :)
Thanks for the explanation. I don't doubt that you (and the code) are
right -- but I wanted to understand why.
>> Hmm, ok that seems to be two questions. Let's make that a starter for 10
>> and a bonus for whoever buzzes fastest.
>
> Not sure if that answers your question. So what did I win? :-)
Why glory***, naturally.
regards,
Andrew Dinn
-----------
*** n.b. to find out what 'glory' means see Through The Looking Glass
More information about the hotspot-compiler-dev
mailing list