RFR: 8221102: Allow GC threads to participate in threads claiming protocol

Thomas Schatzl thomas.schatzl at oracle.com
Tue Mar 26 10:12:32 UTC 2019


Hi,

On Thu, 2019-03-21 at 18:25 -0400, Kim Barrett wrote:
> Please review this change to the thread claiming protocol for
> parallel iteration over threads. Previously, the protocol used a 1bit
> claim counter plus zero as a "never claimed" marker. The new protocol
> uses a uintx counter, while retaining zero as a "never claimed"
> marker.
> 
> 
[...]
> We address this by expanding the claim counter to a uintx-sized
> counter. There is still a theoretical possibility of collision, which
> 

[...]
> 
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8221102
> 
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8221102/open.00/
> 
> Testing:
> mach5 tier1-5.
> 

looks good. One minor style nit: I would prefer that in thread.cpp:
Threads::change_hread_claim_token():4521 the thread_claim_token would
be set to a particular value (i.e. 1) directly instead of incremented
from its current original value. This makes that assignment context-
free. But I am fine with keeping it as is.

Thanks,
  Thomas




More information about the hotspot-dev mailing list