RFR: 8261501: Shenandoah: reconsider heap statistics memory ordering
Roman Kennke
rkennke at openjdk.java.net
Tue Feb 16 10:14:40 UTC 2021
On Wed, 10 Feb 2021 11:10:35 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> ShenandoahHeap collects heap-wide statistics (used, committed, etc). It does so by atomically updating them with default CASes. Unfortunately, Hotspot's default for atomic operations is memory_order_conservative, which emits two-way memory fences around the CASes at least on AArch64 and PPC64.
>
> This is excessive for statistics gathering, and "relaxed" should be just as good.
>
> Additional testing:
> - [x] Linux x86_64 hotspot_gc_shenandoah
> - [x] Linux AArch64 hotspot_gc_shenandoah
> - [x] Linux AArch64 tier1 with Shenandoah
Looks good to me! Thanks!
-------------
Marked as reviewed by rkennke (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2504
More information about the hotspot-gc-dev
mailing list