RFR: Load balance remembered set scanning [v2]

William Kemper wkemper at openjdk.org
Fri Jul 29 17:40:34 UTC 2022


On Thu, 28 Jul 2022 19:18:20 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> This branch divides remembered set scanning into smaller units of work so that multiple cores can more effectively share the workload between them.  The benefit is to reduce concurrent scan remembered set times and to increase the parallelism of this phase.
>
> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Respond to reviewer comments

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 2593:

> 2591:               // Future TODO: establish a second remembered set to identify which old-gen regions point to other old-gen
> 2592:               // regions which are in the collection set for a particular mixed evacuation.
> 2593:               if (start_of_range < end_of_range) {

Before this change, we had update references and marking share most of the card scanning code. Is it no longer possible to share the card scanning code as before? Could we put some of this code in the scanner?

src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp line 155:

> 153:   // Last group does the remnant of heap, one _smallest_chunk_size at a time.
> 154:   // Round down.
> 155:   return _heap->num_regions() / 2;

I don't understand this comment. Is this a `TODO` comment? Or should this be `initial_group_size`?

src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.cpp line 216:

> 214:       num_groups++;
> 215: 
> 216:       if (num_groups >= _num_groups) {

This is somewhat confusing to read. Is `num_groups` really `groups_created`? and `_num_groups` a target number of groups?

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

PR: https://git.openjdk.org/shenandoah/pull/153


More information about the shenandoah-dev mailing list