RFR: 8345177: RISC-V: Add gtests for cmpxchg

Robbin Ehn rehn at openjdk.org
Fri Nov 29 13:52:39 UTC 2024


On Fri, 29 Nov 2024 12:13:22 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> The exact implementation of flush we may want to change, e.g. Zjid, I/D consistency.
>> And the same goes for CMF, e.g. with Zijd it may be an IMPORT.I and FENCE.I or similar.
>> Here we don't care about that, we only want to test some instructions.
>> 
>> The scary options here is UseCtxFencei, which allows us to avoid some icache flush.
>> And we may want to remove more icache flushes.
>> 
>> By having both we get a pretty good guarantee that future optimizations don't break this gtest.
>> As producer I call flush(), as consumer I call CMF.
>> 
>> But yes we can remove CMF, I'm fine with that also, maybe my paranoia is not warranted.
>
> I see. But I am a bit worried that this could be misleading to people. We have the CMF, but we only have one thread working as both producer and consumer here. Maybe we can keep it simple for now and update as appropriate when those cases you mentioned happen?

Sure

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22437#discussion_r1863553775


More information about the hotspot-dev mailing list