RFR: 8348400: GenShen: assert(ShenandoahHeap::heap()->is_full_gc_in_progress() || (used_regions_size() <= _max_capacity)) failed: Cannot use more than capacity # [v3]

William Kemper wkemper at openjdk.org
Wed Mar 26 17:36:21 UTC 2025


On Tue, 25 Mar 2025 21:16:06 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> Shenandoah cannot recycle immediate trash regions during the concurrent weak roots phase, however some of these regions may be assigned to the old generation collector's reserve. When an evacuation/promotion tries to allocate in such a region, it will fail (as expected) and try to 'steal' a region from the mutator's partition of the free set.  There are cases when this cannot be allowed due to capacity constraints. However, in some of these cases it will be possible to 'swap' a region between the old reserve and the mutator's partition. This change covers this case.
>
> William Kemper has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:
> 
>  - Update evac reserve when swapping trash region for non-trash region
>  - Use capacity of transferred region
>  - Improve comments
>  - Merge remote-tracking branch 'jdk/master' into fix-flip-to-old-reserve
>  - Revert "Do not enforce size constraints on generations"
>    
>    This reverts commit 11ff0677449fa6749df8830f4a03f1c7861ba314.
>  - Do not enforce size constraints on generations
>    
>    This will make it easier for the old generation collector to take regions from the mutator when necessary
>  - Don't allocate in regions that cannot be flipped to old gc
>  - Do not allocate from mutator if young gen cannot spare the region

No assertions after running `TestPauseNotifications` 40,000 times, no failures in performance/stress test pipelines.

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

PR Comment: https://git.openjdk.org/jdk/pull/23998#issuecomment-2755193068


More information about the shenandoah-dev mailing list