RFR: Reset coalesce and fill boundary during global collect

Kelvin Nilsen kdnilsen at openjdk.java.net
Thu Oct 14 23:18:11 UTC 2021


On Thu, 14 Oct 2021 22:27:49 GMT, William Kemper <wkemper at openjdk.org> wrote:

> Normally, this happens during cset selection for the old generation. It also needs to happen for coalesce and fill at the end of global collections or objects may not be filled.

I'm still not sure this is the right place to invoke reset_coalesce_and_fill_boundary().  To support preemption of concurrent coalesce-and-fill, we reset_coalesce_and_fill_boundary() once for each region that needs to be coalesced and filled.  Then we begin the preemptible coalesce and fill effort.  If we preempt in the middle of processing a given region, we will come back to this region where coalesce-and-fill efforts left off, as preserved by the call to suspend_coalesce_and_fill().

Since concurrent GC also invokes this same heap_region_do() service, I believe the change you propose would make us go back to the start of each region and reprocess it multiple times each time we resume coalesce and fill following a preemption.

I think what we want here is to iterate through all relevant regions and reset_coalesce_and_fill_boundary() before a STW GC calls ShenandoahHeap::coalesce_and_fill_old_regions().

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

PR: https://git.openjdk.java.net/shenandoah/pull/90


More information about the shenandoah-dev mailing list