RFR: 8359105: RISC-V: No need for acquire fence in safepoint poll during JNI calls [v2]
Anjian Wen
wenanjian at openjdk.org
Thu Jun 12 03:22:10 UTC 2025
> 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.
>
> [0] https://github.com/openjdk/jdk/pull/20420
Anjian Wen has updated the pull request incrementally with one additional commit since the last revision:
RISC-V: delete the acquire argument in safepoint_poll since there is no use
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25709/files
- new: https://git.openjdk.org/jdk/pull/25709/files/5ca62af4..47065b4a
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25709&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25709&range=00-01
Stats: 14 lines in 8 files changed: 0 ins; 5 del; 9 mod
Patch: https://git.openjdk.org/jdk/pull/25709.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25709/head:pull/25709
PR: https://git.openjdk.org/jdk/pull/25709
More information about the hotspot-dev
mailing list