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

8321025: Enable Neoverse N1 optimizations for Neoverse V2 #16887

Closed
wants to merge 1 commit into from

Conversation

eastig
Copy link
Member

@eastig eastig commented Nov 29, 2023

As Arm Neoverse V2 will benefit from the same optimizations as Neoverse N1 does, it should have OnSpinWaitInst/OnSpinWaitInstCount defaults set to "isb"/1 and UseSIMDForMemoryOps default set to true.
This patch sets these flags accordingly for the V2 architecture.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8321025: Enable Neoverse N1 optimizations for Neoverse V2 (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/16887/head:pull/16887
$ git checkout pull/16887

Update a local copy of the PR:
$ git checkout pull/16887
$ git pull https://git.openjdk.org/jdk.git pull/16887/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16887

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/16887.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 29, 2023

👋 Welcome back eastigeevich! A progress list of the required criteria for merging this PR into master 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 added the rfr Pull request is ready for review label Nov 29, 2023
@openjdk
Copy link

openjdk bot commented Nov 29, 2023

@eastig The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Nov 29, 2023
@mlbridge
Copy link

mlbridge bot commented Nov 29, 2023

Webrevs

@eastig
Copy link
Member Author

eastig commented Nov 29, 2023

@nick-arm, could you please have a look?

@openjdk
Copy link

openjdk bot commented Nov 29, 2023

@eastig 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:

8321025: Enable Neoverse N1 optimizations for Neoverse V2

Reviewed-by: ngasson, shade

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 7 new commits pushed to the master branch:

  • 62418c6: 8319444: Unhelpful failure output in TestLegalNotices
  • cdd1a6e: 8313816: Accessing jmethodID might lead to spurious crashes
  • b65ccff: 8320877: Shenandoah: Remove ShenandoahUnloadClassesFrequency support
  • b68356b: 8320806: Augment test/langtools/tools/javac/versions/Versions.java for JDK 22 language changes
  • d783aa3: 8320940: Fix typo in java.lang.Double
  • 43c7f6a: 8320907: Shenandoah: Remove ShenandoahSelfFixing flag
  • da7bcfc: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

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

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 29, 2023
Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

Okay in principle, but I have a question, there is another block below:

  // Neoverse V1
  if (_cpu == CPU_ARM && model_is(0xd40)) {
    if (FLAG_IS_DEFAULT(UseCryptoPmullForCRC32)) {
      FLAG_SET_DEFAULT(UseCryptoPmullForCRC32, true);
    }
  }

Should it be enabled for V2 as well?

@eastig
Copy link
Member Author

eastig commented Nov 29, 2023

Okay in principle, but I have a question, there is another block below:

  // Neoverse V1
  if (_cpu == CPU_ARM && model_is(0xd40)) {
    if (FLAG_IS_DEFAULT(UseCryptoPmullForCRC32)) {
      FLAG_SET_DEFAULT(UseCryptoPmullForCRC32, true);
    }
  }

Should it be enabled for V2 as well?

Good catch. I'll check whether V2 has the same or better pmull as V1.

@shipilev
Copy link
Member

Good catch. I'll check whether V2 has the same or better pmull as V1.

Although, it would not be "enabling N1 optos for V2", it would be "enabling V1 optos for V2" :)
Your call if you just want to make that change separately.

@eastig
Copy link
Member Author

eastig commented Nov 30, 2023

UseCryptoPmullForCRC32

According to the V2 optimization guide pmull is the same in V2 as in V1. So UseCryptoPmullForCRC32 should be enabled for V2 as well.

I'd do this in a separate PR to allow this change to be backported to jdk11u. There is no UseCryptoPmullForCRC32 in jdk11u.

@eastig
Copy link
Member Author

eastig commented Nov 30, 2023

@eastig
Copy link
Member Author

eastig commented Nov 30, 2023

/integrate

@eastig
Copy link
Member Author

eastig commented Nov 30, 2023

Thanks @shipilev @nick-arm for the review.

@openjdk
Copy link

openjdk bot commented Nov 30, 2023

Going to push as commit c9d15f7.
Since your change was applied there have been 20 commits pushed to the master branch:

  • 61653a1: 8320830: [AIX] Dont mix os::dll_load() with direct dlclose() calls
  • 8b102ed: 8321063: AArch64: Zero build fails after JDK-8320368
  • 6941369: 8320921: GHA: Parallelize hotspot_compiler test jobs
  • 0d14636: 8320515: assert(monitor->object_peek() != nullptr) failed: Owned monitors should not have a dead object
  • d6b4aa0: 8318157: RISC-V: implement ensureMaterializedForStackWalk intrinsic
  • 7766785: 8319372: C2 compilation fails with "Bad immediate dominator info"
  • 940f67c: 8318854: [macos14] Running any AWT app prints Secure coding warning
  • c864317: 8320888: Shenandoah: Enable ShenandoahVerifyOptoBarriers in debug builds
  • d1e73b1: 8318626: GetClassFields does not filter out ConstantPool.constantPoolOop field
  • ea6e92e: 8320945: problemlist tests failing on latest Windows 11 update
  • ... and 10 more: https://git.openjdk.org/jdk/compare/a2c5f1fc914ef5c28d044b75598f895cf6097138...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 30, 2023
@openjdk openjdk bot closed this Nov 30, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 30, 2023
@openjdk
Copy link

openjdk bot commented Nov 30, 2023

@eastig Pushed as commit c9d15f7.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants