RFR: 8370039: GenShen: array copy SATB barrier improvements [v3]
Aleksey Shipilev
shade at openjdk.org
Mon Nov 17 14:42:21 UTC 2025
On Tue, 11 Nov 2025 00:33:36 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> When an array copy happens concurrently with old and young marking, Shenandoah's generational mode walks over the array twice. This is unnecessary and increases the workload for marking threads. It also has been unconditionally enqueuing old references during a young mark. This is also unnecessary and also increases marking workload. Finally, the barrier went through a somewhat complicated decision process based on affiliation of the region where the array resides. However, the barrier must consider the affiliation of objects that are pointed at by array elements.
>
> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
>
> Revert "We can also filter out old when striclty marking young"
>
> This reverts commit c53c4f23f4401785e1049494b6c4e4b92f9a5701.
Looks reasonable, but a question.
src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp line 428:
> 426:
> 427: const char gc_state = ShenandoahThreadLocalData::gc_state(Thread::current());
> 428: if ((gc_state & ShenandoahHeap::MARKING) != 0) {
A question on sequencing. Can we have marking and update-refs at the same time? If so, should update-refs happen first, and then marking should be doing the walk over (fixed-up) objects?
-------------
PR Review: https://git.openjdk.org/jdk/pull/28183#pullrequestreview-3472900617
PR Review Comment: https://git.openjdk.org/jdk/pull/28183#discussion_r2534226107
More information about the hotspot-gc-dev
mailing list