Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8202845

Refactor reference processing for improved parallelism

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b19

      Backports

        Description

        From [~kbarrett]:
        "The existing 3-phase processing is nice and simple and general, but it is really not helpful when one starts dealing with parallelism, scaling issues, and task startup/termination costs. Various changes in reference processing since that 3-phase approach was instituted allow or make more beneficial various changes.

        A better set of phases would be something like

        (1) Current phase1 for SoftReferences (maybe; JDK-8051680).

        (2) Walk discovered Soft/Weak/FinalReferences (together) and, if NULL or live referent then drop (applying keep_alive to the referent, but complete_gc is not needed), else if not FinalReference then clear and enqueue.

        (3) Walk discovered FinalReferences residue from (2), applying keep_alive and complete_gc, and enqueue.

        (4) Walk discovered PhantomReferences and (a) drop those with NULL or live referents (applying keep_alive to the referent, but complete_gc is not needed), and (b) clear and enqueue those with dead referents."

        This reduces the number of work gang uses from 9 to 4 and allows better usage of parallelism due to larger per-phase workloads

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tschatzl Thomas Schatzl
                  Reporter:
                  tschatzl Thomas Schatzl
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: