RFR: 8359105: RISC-V: No need for acquire fence in safepoint poll during JNI calls [v2]
Robbin Ehn
rehn at openjdk.org
Thu Jun 12 10:16:28 UTC 2025
On Thu, 12 Jun 2025 03:22:10 GMT, Anjian Wen <wenanjian at openjdk.org> wrote:
>> 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] 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
Thanks, looks good!
-------------
Marked as reviewed by rehn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/25709#pullrequestreview-2920420668
More information about the hotspot-dev
mailing list