RFR: 8339097: Parallel: Compact GC to split array early for task stealing

Kim Barrett kbarrett at openjdk.org
Thu Aug 29 19:09:19 UTC 2024


On Wed, 28 Aug 2024 12:49:46 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> Parallel Compact GC splits a large array in stripes during marking, so that other workers can steal the work.
> 
> Currently, it only splits a large array into two tasks, retains and pushes remaining into a task queue for task stealing, depends on next worker to further split the array if possible, that creates artificial dependency.
> 
> I would like purpose to have the first worker breaking up the array, to eliminate the dependency.

Changes requested by kbarrett (Reviewer).

src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp line 129:

> 127:     while (end_index < len) {
> 128:       cm->push_objarray(obj, end_index);
> 129:       end_index += (size_t)ObjArrayMarkingStride;

Don't make this change.  PSCM should instead be changed to use PartialArrayTaskStepper and
PartialArrayState, with associated elimination of the separate ObjArrayTask queue.

-------------

PR Review: https://git.openjdk.org/jdk/pull/20745#pullrequestreview-2269876411
PR Review Comment: https://git.openjdk.org/jdk/pull/20745#discussion_r1736955852


More information about the hotspot-gc-dev mailing list