RFR: 8324186: AARCH64: Use "dmb.ishst+dmb.ishld" for release barrier
Andrew Haley
aph at openjdk.org
Mon Jan 22 10:17:28 UTC 2024
On Mon, 22 Jan 2024 01:58:32 GMT, kuaiwei <duke at openjdk.org> wrote:
> Details is https://mail.openjdk.org/pipermail/hotspot-compiler-dev/2024-January/071921.html.
> Using a combined dmb.ish for release barrier will introduce a heavy storeload barrier. Use "dmb.ishst+dmb.ishld" pair instead, we can gain performance improvement on N1 and N2 architecture. The benchmark is test/micro/org/openjdk/bench/vm/compiler/FinalFieldInitialize.java
> Run with ParallelGC to minimalize impact of gc barrier.
>
> make test TEST="micro:org.openjdk.bench.vm.compiler.FinalFieldInitialize" MICRO="VM_OPTIONS=-XX:+UseParallelGC"
> ...
> FinalFieldInitialize.testAllocWithFinal thrpt 9 1411.601 ? 6.546 ops/s
>
> Without the patch
>
> FinalFieldInitialize.testAllocWithFinal thrpt 9 1214.575 ? 14.217 ops/s
Very nice. Thanks.
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 2069:
> 2067: if (last != nullptr && nativeInstruction_at(last)->is_Membar() && prev == last) {
> 2068: NativeMembar *bar = NativeMembar_at(prev);
> 2069: // We need avoid promoting barrier to dmb.ish,
Suggestion:
// Don't promote DMB ST|DMB LD to DMB (a full barrier) because
// doing so would introduce a StoreLoad which the caller did not
// intend.
I think that should be clear enough.
-------------
Marked as reviewed by aph (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17511#pullrequestreview-1836113464
PR Review Comment: https://git.openjdk.org/jdk/pull/17511#discussion_r1461628025
More information about the hotspot-dev
mailing list