RFR: 8342444: Shenandoah: Uncommit regions from a separate, STS aware thread [v3]
William Kemper
wkemper at openjdk.org
Tue Nov 19 19:26:06 UTC 2024
On Tue, 19 Nov 2024 11:33:51 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Prevent uncommit thread from running during GC
>
> src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp line 253:
>
>> 251: }
>> 252:
>> 253: heap->allow_uncommit();
>
> This looks to be happening on every iteration, even if no GC happened. Should this `allow_uncommit()` go into the same block where `allow_commit()` is? Maybe it would be cleaner to make a `StackObj` mark object to manage this state -- up to you.
Hmm, good catch. I think it's a little worse than this even. The code that is meant to trigger an uncommit:
if (ShenandoahUncommit) {
if (heap->check_soft_max_changed()) {
heap->notify_soft_max_changed();
} else if (is_gc_requested) {
heap->notify_explicit_gc_requested();
}
}
Will only happen when uncommit is forbidden. The notification will fall on deaf ears, as it were. I'll fix this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22019#discussion_r1848942547
More information about the hotspot-gc-dev
mailing list