-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8359105: RISC-V: No need for acquire fence in safepoint poll during JNI calls #25709
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
8359105: RISC-V: No need for acquire fence in safepoint poll during JNI calls #25709
Conversation
👋 Welcome back wenanjian! A progress list of the required criteria for merging this PR into |
@Anjian-Wen 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:
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 67 new commits pushed to the
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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@robehn, @RealFYang, @feilongjiang) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@Anjian-Wen The following label will be automatically applied to this pull request:
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. |
/issue JDK-8359105 |
@Anjian-Wen The primary solved issue for a PR is set through the PR title. Since the current title does not contain an issue reference, it will now be updated. |
Webrevs
|
@robehn Hi, Can you help to review the patch? |
Hey, sure. The description says "backport of", as you are changing master I think that description is wrong. The downcallLinker_riscv.cpp is the same case as the native transition. AFIACT no one should use acquire, thus this should then mean that we can remove "bool acquire" argument from safepoint_poll(). That arm still have acquire in their downlinker seems like an oversight? Thanks, Robbin |
Thanks for the reminder, created JDK-8359252. It was intentional to limit the scope of the original change to JNI (due the amount of testing and usages). |
Thanks for your review!! I have changed the description.
|
Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. FYI: I see another pending PR (#25211) which handles the rest for aarch64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine. Thanks!
/integrate |
@Anjian-Wen |
@robehn @feilongjiang @RealFYang Thanks for your review and approve ! |
/sponsor |
Going to push as commit 1a01839.
Your commit was automatically rebased without conflicts. |
@feilongjiang @Anjian-Wen Pushed as commit 1a01839. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Acquire fence removal in safepoint_poll
At least in jdk11, when comes to safepoint::end, it will invoke SafepointMechanism::disarm_local_poll to change the polling_word_offset, which may cause a race when thread come to visit polling_word_offset in native_trans state, so we used to use acquire fence.
Since the disarm_local_poll has been removed from SafepointSynchronize::end, Thread disarm itself in
JavaThread::check_special_condition_for_native_trans when trans from native. it seems that there is no need for acquire fence in safepoint_poll.
[0] #20420
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25709/head:pull/25709
$ git checkout pull/25709
Update a local copy of the PR:
$ git checkout pull/25709
$ git pull https://git.openjdk.org/jdk.git pull/25709/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25709
View PR using the GUI difftool:
$ git pr show -t 25709
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25709.diff
Using Webrev
Link to Webrev Comment