-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
base: master
Are you sure you want to change the base?
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 |
❗ This change is not yet ready to be integrated. |
@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.
|
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
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