RFR: 8343978: Update the default value of CodeEntryAlignment for Ampere-1A and 1B

Liming Liu lliu at openjdk.org
Fri Nov 22 08:14:15 UTC 2024


On Thu, 21 Nov 2024 12:15:49 GMT, Boris Ulasevich <bulasevich at openjdk.org> wrote:

>> This PR updates the default value of CodeEntryAlignment for Ampere-1A and 1B from 64 to 32. The microbenchmark CodeCacheStress shows that frontend stall becomes ~21% smaller by the change, and IPC increases by ~2.8%. The benefits persist after CodeCacheSegmentSize changes from 64 back to 128.
>> 
>> Ran JTReg tier1 on Ampere-1A and no new issues were found.
>
> Cool. I like the updates of rusty default settings is going on.
> 
> On https://github.com/openjdk/jdk/pull/20864 review comments we see that CodeEntryAlignment=16/32 was not good for AMPERE. Did you check both CPU_MODEL_AMPERE_1A/CPU_MODEL_AMPERE_1B CPUs? Are you sure the performance is good on all CPUs with 1A/1B cpu flag?

Hi, @bulasevich. Ampere CPU mentioned in #20864 is Neoverse-N1, while this pull request is about Ampere-1A/1B. This two architectures prefer 32B alignment for code entries, since we can find that GCC did it for both Ampere-1A [1] and 1B [2], and the microbenchmark also shows IPC increases due to the decreases of frontend stall, which is a strong evidence.

1: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=590a06afbf0e96813b5879742f38f3665512c854;hp=5ba25973e2f403ee48af2ba579af5017b2f650fb
2: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=cbf2369f3b545e0187fe2e659c764fabf75bb479;hp=99d114c15523e0bfe7a89ef1947f82eb5ff0260b

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

PR Comment: https://git.openjdk.org/jdk/pull/22134#issuecomment-2493129722


More information about the hotspot-dev mailing list