RFR: 8342444: Shenandoah: Uncommit regions from a separate, STS aware thread [v3]
Aleksey Shipilev
shade at openjdk.org
Tue Nov 19 11:37:58 UTC 2024
On Fri, 15 Nov 2024 21:35:03 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> Currently, Shenandoah uncommits regions from its control thread. The control thread is responsible for starting GC cycles in a timely fashion. Uncommitting memory from this thread may introduce unwanted delays in the control thread's response to GC pressure.
>
> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
>
> Prevent uncommit thread from running during GC
I like it, thanks!
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.
src/hotspot/share/gc/shenandoah/shenandoahUncommitThread.cpp line 189:
> 187: void ShenandoahUncommitThread::allow_uncommit() {
> 188: _uncommit_allowed.set();
> 189: }
New line at the end of file here.
-------------
Marked as reviewed by shade (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/22019#pullrequestreview-2445178952
PR Review Comment: https://git.openjdk.org/jdk/pull/22019#discussion_r1848181197
PR Review Comment: https://git.openjdk.org/jdk/pull/22019#discussion_r1848183019
More information about the shenandoah-dev
mailing list