RFR: 8293007: riscv: failed to build after JDK-8290025 [v2]

Yadong Wang yadongwang at openjdk.org
Tue Aug 30 09:10:13 UTC 2022


On Tue, 30 Aug 2022 07:12:45 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

>> Yadong Wang has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - fix typo
>>  - fix typo
>
> src/hotspot/cpu/riscv/stubGenerator_riscv.cpp line 2352:
> 
>> 2350:       __ lwu(t1, t1);
>> 2351:       __ sw(t1, thread_epoch_addr);
>> 2352:       __ membar(__ LoadLoad);
> 
> Don't you need a FENCE.I instruction here? Similar to the AArch64 isb instruction.

We don't need a fence.i here in the riscv port , see our discussion in https://mail.openjdk.org/pipermail/riscv-port- dev/2022-July/000572.html.

In the riscv world, fence.i in user-space cannot guarante the read hart see the modified code because threads may migrate to other processor core after fence.i. Instead, we called icache_flush() after the write hart modified code, which synchronized all harts to flush icache by IPI in kernel mode. So the read hart do not need a fence.i.

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

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


More information about the shenandoah-dev mailing list