RFR: 8294775: Shenandoah: reduce contention on _threads_in_evac [v4]
Aleksey Shipilev
shade at openjdk.org
Mon Nov 14 15:15:29 UTC 2022
On Tue, 11 Oct 2022 12:28:27 GMT, Nick Gasson <ngasson at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.cpp line 55:
>>
>>> 53: // *and* the counter is zero.
>>> 54: while (Atomic::load_acquire(ptr) != OOM_MARKER_MASK) {
>>> 55: os::naked_short_sleep(1);
>>
>> Not sure if SpinPause() may be better here? @shipilev probably knows more.
>
> I think we'd probably want some back-off here rather than spinning indefinitely? E.g. spin N times and then start sleeping.
This code does what old code did, and on that grounds it is fine to keep `naked_short_sleep`.
-------------
PR: https://git.openjdk.org/jdk/pull/10573
More information about the hotspot-gc-dev
mailing list