G1: Enqueuing dirty cards during reference enqueuing in phase 3 does not scale

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Not an Issue
    • Priority: P4
    • tbd
    • Affects Version/s: 9
    • Component/s: hotspot
    • None
    • gc

      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.

            Assignee:
            Unassigned
            Reporter:
            Sangheon Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: