[jdk17u-dev] RFR: 8298472: AArch64: Detect Ampere-1 and Ampere-1A CPUs and set default options [v3]
Patrick Zhang
qpzhang at openjdk.org
Fri Feb 3 08:38:13 UTC 2023
On Thu, 2 Feb 2023 13:43:28 GMT, Patrick Zhang <qpzhang at openjdk.org> wrote:
>> Backport of CPU detection function for Ampere-1 and Ampere-1A, and performance enhancement with turning on UseSIMDForMemoryOps option for these two CPUs by default. Verified OpenJDK bundled JMH test cases, `make run-test TEST="micro:java.lang.ArrayCopy*"` , SIMD vs NoSIMD ratios are mostly positive as expected, aligned with that on jdk mainline. Low risk to other functions/systems due to the CPU detection logic.
>>
>> Not a clean backport, manually resolved below conflicts, **no function change**:
>> 1. Copyright years are `1997, 2021` in 17u-dev instead of the expected `1997, 2022` in two files
>> 2. `@@ -132,7 +132,7 @@ void VM_Version::initialize()` should be 131 for 17u-dev
>> 3. `@@ -144,6 +144,13 @@ void VM_Version::initialize() ` should be 143 for 17u-dev
>> 4. The `enum Feature_Flag` in 17u-dev has been updated in jdk mainline to: declaring the macro `#define CPU_FEATURE_FLAGS` firstly then wrapping it inside the enum. So the line numbers are not aligned during doing `git apply`
>>
>> FYI, a try-out: manually fixing these conflicts according to `git apply -v` in the patch file can make it applied cleanly.
>>
>> Additional tests done:
>> 1. Linux aarch64 release tier1 on Ampere-1 system, without explicitly specifying UseSIMDForMemoryOps
>> 6. OpenJDK GHA Sanity Checks on forked repo: https://github.com/cnqpzhang/jdk17u-dev/actions/runs/3919027362
>>
>> Backport-of: 706845743699efb01994e2d12c65023a3e972b77
>> Signed-off-by: Patrick Zhang <patrick at os.amperecomputing.com>
>
> Patrick Zhang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
>
> - Merge branch 'openjdk:master' into JDK-8298472-ampere-simd-memops
> - Merge branch 'master' into JDK-8298472-ampere-simd-memops
> - 8298472: AArch64: Detect Ampere-1 and Ampere-1A CPUs and set default options
>
> Backport-of: 706845743699efb01994e2d12c65023a3e972b77
> Signed-off-by: Patrick Zhang <patrick at os.amperecomputing.com>
Rebased this once again in order to resolve the windows-x64 pre-submit testing failures caused by a JTReg script issue and fixed by a recent [patch ](https://github.com/openjdk/jtreg/commit/dffb1eeafe74a09a07db758f289e07ffa92d8b53)at [jtreg-6.1+3](https://github.com/openjdk/jtreg/commits/jtreg-6.1+3).
Right now all tests passed.
@GoeLin Could you please help review this patch? If it requires a particular review from aach64-port, please let me know and I could ask for someone's favor there. Thanks
Let me re-summarize the information of this PR (this is aligned the description in JBS):
1. This backport is to simply enable UseSIMDForMemoryOps aarch64 option for Ampere-1 and Ampere-1A CPUs
2. The risk is low, since the option is very mature and has been there for long. The CPU detection limits the change on specific CPUs only.
3. Patch does NOT apply cleanly due to Copyright years and some line numbers mismatching, pretty trivial updates can resolve the conflict.
4. No obvious JBS dependency so far, as functions related have been in 17u-dev for some time.
5. Ran JDK bundled JMH micro benchmarks, tier1 and commercial benchmarks, results are good.
-------------
PR: https://git.openjdk.org/jdk17u-dev/pull/1067
More information about the jdk-updates-dev
mailing list