RFR: 8372543: Shenandoah: undercalculated the available size when soft max takes effect [v3]
Rui Li
duke at openjdk.org
Thu Dec 4 21:24:04 UTC 2025
On Thu, 4 Dec 2025 20:30:27 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> Rui Li has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove unused freeset includes
>
> src/hotspot/share/gc/shenandoah/shenandoahGlobalGeneration.cpp line 81:
>
>> 79: }
>> 80:
>> 81: size_t ShenandoahGlobalGeneration::soft_available_exclude_evac_reserve() const {
>
> Two questions:
> * How is this override different from the default implementation now?
> * Should we not also take the minimum of this value and `free_set()->available()` as we do elsewhere?
- Good call. No functional differences except for a safety assert: `assert(max_capacity() >= soft_max`, which isn't that necessary since the app wouldn't start if this wasn't true: [code](https://github.com/openjdk/jdk/blob/8e653d394e45180e16714124ed6584f912eb5cba/src/hotspot/share/gc/shared/jvmFlagConstraintsGC.cpp#L277). Will remove the override.
- I don't think it's needed for global. `free_set()->available()` (space reserved for mutators) could be smaller than `mutator_soft_max` when there's an old gen taking space. If there's no generation, the `mutator_soft_max` should always be less or equal than `free_set()->available()`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28622#discussion_r2590621429
More information about the shenandoah-dev
mailing list