RFR: 8373468: Shenandoah: Mutator may block at _gc_waiters_lock after allocation failure even block parameter is false [v3]
Xiaolong Peng
xpeng at openjdk.org
Thu Dec 11 18:39:01 UTC 2025
On Thu, 11 Dec 2025 17:44:35 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Only load _requested_gc_cause once when figuring out pending requests
>
> src/hotspot/share/gc/shenandoah/shenandoahControlThread.hpp line 46:
>
>> 44:
>> 45: ShenandoahSharedFlag _gc_requested;
>> 46: Atomic<GCCause::Cause> _requested_gc_cause;
>
> `_requested_gc_cause` should always be accessed when holding the `_control_lock`. Making this atomic should not be unnecessary.
Yes, the change to use Atomic for _requested_gc_cause is unnecessary, I have reverted it with a minor change for ShenandoahControlThread to always access _requested_gc_cause with `_control_lock` held.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28758#discussion_r2611654969
More information about the hotspot-gc-dev
mailing list