RFR: 8294775: Shenandoah: reduce contention on _threads_in_evac [v2]

Roman Kennke rkennke at openjdk.org
Mon Nov 14 11:48:42 UTC 2022


On Wed, 19 Oct 2022 17:05:26 GMT, Nick Gasson <ngasson at openjdk.org> wrote:

>> The idea here is to reduce contention on the shared `_threads_in_evac` counter by splitting its state over multiple independent cache lines. Each thread hashes to one particular counter based on its `Thread*`. This helps improve throughput of concurrent evacuation where many Java threads may be attempting to update this counter on the load barrier slow path.
>> 
>> See this earlier thread for details and SPECjbb results: https://mail.openjdk.org/pipermail/shenandoah-dev/2022-October/017494.html
>> 
>> Also tested `hotspot_gc_shenandoah` on x86 and AArch64.
>
> Nick Gasson has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Refactor

This looks good to me now. Just one minor style nit, changing this doesn't require another review from me. Maybe @shipilev wants to review it, too?

Thank you!

src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.cpp line 117:

> 115: }
> 116: 
> 117: ShenandoahEvacOOMCounter *ShenandoahEvacOOMHandler::counter_for_thread(Thread* t) {

Very minor nit: we ususally put the * next to the type, i.e. ShenandoahEvacOOMCounter*.

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

Marked as reviewed by rkennke (Reviewer).

PR: https://git.openjdk.org/jdk/pull/10573


More information about the hotspot-gc-dev mailing list