Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8296602: RISC-V: improve performance of copy_memory stub #9

Merged
merged 1 commit into from Mar 22, 2023

Conversation

VladimirKempik
Copy link
Contributor

@VladimirKempik VladimirKempik commented Mar 9, 2023

Please review this backport of JDK-8296602 to jdk17u
This effectively unrolls copy memory loop offering significant perf improvement on real hw platforms. ( data are the same as in original commit)

RISC-V only change, low risk for other platforms.
Testing: TBD.

thead rvb-ice c910
thead

Before ( copy8 only )
Benchmark (size) Mode Cnt Score Error Units
ArrayCopyObject.conjoint_micro 31 thrpt 25 6653.095 ± 251.565 ops/ms
ArrayCopyObject.conjoint_micro 63 thrpt 25 4933.970 ± 77.559 ops/ms
ArrayCopyObject.conjoint_micro 127 thrpt 25 3627.454 ± 34.589 ops/ms
ArrayCopyObject.conjoint_micro 2047 thrpt 25 368.249 ± 0.453 ops/ms
ArrayCopyObject.conjoint_micro 4095 thrpt 25 187.776 ± 0.306 ops/ms
ArrayCopyObject.conjoint_micro 8191 thrpt 25 94.477 ± 0.340 ops/ms

after ( with copy32 )
ArrayCopyObject.conjoint_micro 31 thrpt 25 7620.546 ± 69.756 ops/ms
ArrayCopyObject.conjoint_micro 63 thrpt 25 6677.978 ± 33.112 ops/ms
ArrayCopyObject.conjoint_micro 127 thrpt 25 5206.973 ± 22.612 ops/ms
ArrayCopyObject.conjoint_micro 2047 thrpt 25 653.655 ± 31.494 ops/ms
ArrayCopyObject.conjoint_micro 4095 thrpt 25 352.905 ± 7.390 ops/ms
ArrayCopyObject.conjoint_micro 8191 thrpt 25 165.127 ± 0.832 ops/ms

after ( copy32 with dead code elimination and independent addis )
ArrayCopyObject.conjoint_micro 31 thrpt 25 7576.346 ? 94.487 ops/ms
ArrayCopyObject.conjoint_micro 63 thrpt 25 6475.730 ? 252.590 ops/ms
ArrayCopyObject.conjoint_micro 127 thrpt 25 5221.764 ? 20.415 ops/ms
ArrayCopyObject.conjoint_micro 2047 thrpt 25 691.847 ? 1.102 ops/ms
ArrayCopyObject.conjoint_micro 4095 thrpt 25 360.269 ? 1.091 ops/ms
ArrayCopyObject.conjoint_micro 8191 thrpt 25 179.733 ? 3.012 ops/ms

on hifive unmatched:

before:
Benchmark (size) Mode Cnt Score Error Units
ArrayCopyObject.conjoint_micro 31 thrpt 25 5391.575 ± 152.984 ops/ms
ArrayCopyObject.conjoint_micro 63 thrpt 25 3700.946 ± 43.175 ops/ms
ArrayCopyObject.conjoint_micro 127 thrpt 25 2316.160 ± 24.734 ops/ms
ArrayCopyObject.conjoint_micro 2047 thrpt 25 188.616 ± 0.151 ops/ms
ArrayCopyObject.conjoint_micro 4095 thrpt 25 95.323 ± 0.053 ops/ms
ArrayCopyObject.conjoint_micro 8191 thrpt 25 46.935 ± 0.041 ops/ms

after:
Benchmark (size) Mode Cnt Score Error Units
ArrayCopyObject.conjoint_micro 31 thrpt 25 6136.169 ± 330.409 ops/ms
ArrayCopyObject.conjoint_micro 63 thrpt 25 4924.020 ± 78.529 ops/ms
ArrayCopyObject.conjoint_micro 127 thrpt 25 3732.561 ± 89.606 ops/ms
ArrayCopyObject.conjoint_micro 2047 thrpt 25 431.103 ± 0.505 ops/ms
ArrayCopyObject.conjoint_micro 4095 thrpt 25 221.543 ± 0.363 ops/ms
ArrayCopyObject.conjoint_micro 8191 thrpt 25 100.586 ± 0.197 ops/ms


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8296602: RISC-V: improve performance of copy_memory stub

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/riscv-port-jdk17u pull/9/head:pull/9
$ git checkout pull/9

Update a local copy of the PR:
$ git checkout pull/9
$ git pull https://git.openjdk.org/riscv-port-jdk17u pull/9/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9

View PR using the GUI difftool:
$ git pr show -t 9

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/riscv-port-jdk17u/pull/9.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 9, 2023

👋 Welcome back vkempik! A progress list of the required criteria for merging this PR into riscv-port will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title Backport bd57e2138fc980822a149af905e572ab71ccbf11 8296602: RISC-V: improve performance of copy_memory stub Mar 9, 2023
@openjdk
Copy link

openjdk bot commented Mar 9, 2023

This backport pull request has now been updated with issue from the original commit.

@openjdk
Copy link

openjdk bot commented Mar 9, 2023

@VladimirKempik This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8296602: RISC-V: improve performance of copy_memory stub

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the riscv-port branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the riscv-port branch, type /integrate in a new comment.

@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 9, 2023
@mlbridge
Copy link

mlbridge bot commented Mar 9, 2023

Webrevs

@VladimirKempik
Copy link
Contributor Author

I have filled openjdk/jdk17u-dev#1200 to have more clean tier1 results

@VladimirKempik
Copy link
Contributor Author

Testing looks good, no new failures in tier1, hotspot:tier2 is clean

I have created PR for backport of JDK-8292407 to jdk17u, it will significantly reduce the amount of failures in tier1, please merge riscv-port branch with master once this backport is integrated.

One strange failure I see before and after the patch is "runtime/8176717/TestInheritFD.java", maybe it's my setup, but unlikely.

Ping @RealFYang for integration

@RealFYang
Copy link
Member

RealFYang commented Mar 11, 2023

Thanks for filing the upstream backporting to fix the failing tests. I will do a merge once that's integrated.
Regarding this performance backporting, I would put off integration for a while after several other nasty bugs are fixed.

@VladimirKempik
Copy link
Contributor Author

@RealFYang , it's integrated

Copy link
Member

@RealFYang RealFYang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also tried this test "runtime/8176717/TestInheritFD.java" on my boards, it passed stably for 10 times run.

@RealFYang RealFYang merged commit 3e3e63c into openjdk:riscv-port Mar 22, 2023
1 check passed
@VladimirKempik VladimirKempik deleted the JDK-8296602 branch March 22, 2023 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport clean ready Pull request is ready to be integrated rfr Pull request is ready for review
2 participants