For G1 there is a problem with enqueuing references in phase 3. That enqueue applies the barrier set's write_ref_field to the discovered links being added to the pending list. If the reference is young, this isn't a problem because the write barrier doesn't need to do anything in that case. But if the reference is old, it's going to record a dirty card, and that's going to be in the shared global DirtyCardQueue, since the call is from a non-Java thread. So a locking DCQ.enqueue per reference, and severe lock contention when parallelized. One possiblity might be a special purpose variant of write_ref_field for use here, with most collectors just forwarding to their normal write_ref_field implementation, but G1 using per-worker DCQs.
- relates to
-
JDK-8162929 Enqueuing dirty cards into a single DCQS during GC does not scale
- Resolved
-
JDK-8209974 Eliminate shared PtrQueues
- Closed
-
JDK-8043575 Dynamically parallelize reference processing work
- Resolved
-
JDK-8202017 Merge Reference Enqueuing phase with phase 3 of Reference processing
- Resolved
-
JDK-8219613 Use NonJavaThread PtrQueues
- Resolved