-
Enhancement
-
Resolution: Fixed
-
P4
-
11
-
b19
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8205869 | 11.0.1 | Thomas Schatzl | P4 | Resolved | Fixed | team |
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
"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;
(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
- backported by
-
JDK-8205869 Refactor reference processing for improved parallelism
-
- Resolved
-
- is blocked by
-
JDK-8203028 Simplify reference processing in light of JDK-8175797
-
- Resolved
-
- relates to
-
JDK-8204338 Improve output of discovered/cleared references during reference processing
-
- Open
-
-
JDK-8051680 (ref) unnecessary process_soft_ref_reconsider
-
- Resolved
-