Integrated: 8359105: RISC-V: No need for acquire fence in safepoint poll during JNI calls

Anjian Wen wenanjian at openjdk.org
Mon Jun 16 03:35:35 UTC 2025


On Tue, 10 Jun 2025 06:33:34 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

This pull request has now been integrated.

Changeset: 1a01839f
Author:    Anjian Wen <wenanjian at openjdk.org>
Committer: Feilong Jiang <fjiang at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/1a01839f8c0522a90710e101cce6ecc479a77529
Stats:     28 lines in 8 files changed: 0 ins; 19 del; 9 mod

8359105: RISC-V: No need for acquire fence in safepoint poll during JNI calls

Reviewed-by: rehn, fyang, fjiang

-------------

PR: https://git.openjdk.org/jdk/pull/25709


More information about the hotspot-dev mailing list