RFR: 8352299: GenShen: Young cycles that interrupt old cycles cannot be cancelled [v4]

Aleksey Shipilev shade at openjdk.org
Tue Mar 25 19:31:11 UTC 2025


On Tue, 25 Mar 2025 19:00:53 GMT, William Kemper <wkemper at openjdk.org> wrote:

> `ShenandoahSharedEnumFlag` is only used for this one variable in `ShenandoahHeap`, do you want to remove it entirely and just have a plain `volatile GCCause::Cause _gc_cancelled` member?

Maybe? I was suspecting we want to have padding around the field to make sure we do not accidentally false-share it with anything. But that might not be a real issue. I think we should keep wrapping shared variables in `ShenandoahShared*` to clearly capture which fields are normally accessed by multiple threads, as to encapsulate all the atomic ops.

Actually, leave `addr_of` alone, but file a RFE to redefine `ShenandoahSharedValue` to `uint32_t`, which would eliminate the deviation for the underlying `ShenandoahSharedEnumFlag`.

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

PR Comment: https://git.openjdk.org/jdk/pull/24105#issuecomment-2752314412


More information about the shenandoah-dev mailing list