G1 young/mixed collections and ParallelGC young collections both use PartialArrayScanTasks. These encode the remaining work in the length field of either the from-space array (ParallelGC) or the to-space array (G1). But this doesn't work for pinned array objects, so G1 can't use it for arrays that have failed evacuation. This approach also can't be used by concurrent GCs.
Shenandoah encodes the work state in the high address bits of the array oop in the task. That places limits on the available address space that might not even be valid now (see Linux Large Virtual address space, for example).
G1 concurrent marking and ZGC use segregated task queues for array chunks. This allows normal queues and array chunk queues to have different element sizes, allowing the array chunk queues to carry additional information. However, this complicates queue processing, work stealing, and termination detection.
During the review of
This approach avoids the use-case limits of PartialArrayScanTasks, avoids the additional complexities of segregated queues, and avoids the address space limitation of the Shenandoah encoding. However, it has costs for allocation and management of state objects. The impact of those costs needs to be minimized and the result compared to existing mechanisms.
- relates to
-
JDK-8340470 G1: Adopt PartialArrayState to consolidate marking stack in Full GC
- Open
-
JDK-8341331 G1: Add array chunking statistics counters similar to parallel gc
- Open
-
JDK-8341332 Refactor array chunking statistics counters
- Open
-
JDK-8341630 G1: Adopt PartialArrayState to consolidate marking stack in concurrent marking
- Open
-
JDK-8340119 Remove oopDesc::size_might_change()
- Resolved
-
JDK-8340573 Remove unused G1ParScanThreadState::_partial_objarray_chunk_size
- Resolved
-
JDK-8338248 PartialArrayStateAllocator::Impl leaks Arena array
- Resolved
-
JDK-8271870 G1: Add objArray splitting when scanning object with evacuation failure
- Open
-
JDK-8339668 Parallel: Adopt PartialArrayState to consolidate marking stack in Full GC
- In Progress
-
JDK-8311163 Parallel: Improve large object handling during evacuation
- Resolved
-
JDK-8332455 Improve G1/ParallelGC tasks to not override array lengths
- Closed
-
JDK-8339097 Parallel: Compact GC to split array early for task stealing
- Closed
- links to
-
Commit(master) openjdk/jdk/6a3d0452
-
Review(master) openjdk/jdk/20445