RFR: 8321075: RISC-V: UseSystemMemoryBarrier lacking proper OS support [v2]

Fei Yang fyang at openjdk.org
Tue Feb 20 03:01:56 UTC 2024


On Mon, 19 Feb 2024 09:01:20 GMT, Robbin Ehn <rehn 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
>
> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixed version check

LGTM. Guess that's what we can do for now. I don't have a better solution either.

src/hotspot/os/linux/systemMemoryBarrier_linux.cpp line 71:

> 69:   os::Linux::kernel_version(&major, &minor);
> 70:   if (!(major > 6 || (major == 6 && minor >= 9))) {
> 71:     log_info(os)("Linux kernel %ld.%ld do not support MEMBARRIER PRIVATE_EXPEDITED on RISC-V.",

Suggestion: s/do/does/

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

Marked as reviewed by fyang (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17889#pullrequestreview-1889406276
PR Review Comment: https://git.openjdk.org/jdk/pull/17889#discussion_r1495179092


More information about the hotspot-runtime-dev mailing list