RFR: 8321075: RISC-V: UseSystemMemoryBarrier lacking proper OS support

Robbin Ehn rehn at openjdk.org
Mon Feb 19 07:29:55 UTC 2024


On Sun, 18 Feb 2024 06:54:13 GMT, Yadong Wang <yadongwang at openjdk.org> wrote:

>> Hi, please consider.
>> 
>> RV port was pickup into mainline Linux 4.4.
>> The same version also made membar private expedited mandatory, but this was missed in RV port.
>> This means to we need to check kernel version in runtime to figure out if it's usable.
>> 
>> Kernel fix is here:
>> https://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git/commit/?h=for-next&id=0420af54c2c2b7b3abbd986a41aded7cab0137ef
>
> src/hotspot/os/linux/systemMemoryBarrier_linux.cpp line 70:
> 
>> 68:   long major, minor;
>> 69:   os::Linux::kernel_version(&major, &minor);
>> 70:   if (!(major >= 6 && minor >= 9)) {
> 
> Is there something wrong with this conditional expression? What happens if it's 7.0?

Yes, thanks! I'll fix!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17889#discussion_r1494109979


More information about the hotspot-runtime-dev mailing list