RFR: 8348384: RISC-V: Disable auto-enable Vector on buggy kernels
Robbin Ehn
rehn at openjdk.org
Thu Jan 23 13:02:50 UTC 2025
On Thu, 23 Jan 2025 12:43:44 GMT, Ludovic Henry <luhenry at openjdk.org> wrote:
>> Hi please consider!
>>
>> Linux kernels pre-6.9 can copy a dirty v-state during signal return path:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/riscv/kernel/signal.c?h=v6.13-rc1&id=c27fa53b858b4ee6552a719aa599c250cf98a586
>>
>> We should not auto-enable vector with such kernel, as we must be able to receive signals during the execution of vector code.
>>
>> Manual tested pre and post 6.9 as expected.
>>
>> Thanks, Robbin
>
> src/hotspot/os_cpu/linux_riscv/riscv_hwprobe.cpp line 176:
>
>> 174: log.info("Linux kernels before 6.9 (current %ld.%ld) have a known bug when using Vector and signals.", major, minor);
>> 175: log.info("Vector not enabled automatically via hwprobe, but can be turned on with -XX:+UseRVV.");
>> 176: }
>
> Couldn't you simply have:
> Suggestion:
>
> log_info(
> "Linux kernels before 6.9 (current %ld.%ld) have a known bug when using Vector and signals.\n"
> "Vector not enabled automatically via hwprobe, but can be turned on with -XX:+UseRVV.",
> major, minor);
No, the second line will come out without proper decorators which causes issues for folks grepping/tailing and such from log files.
[0.048s][info ][os ] Linux kernels before 6.9 (current 6.11) have a known bug when using Vector and signals.
[ ] Vector not enabled automatically via hwprobe, but can be turned on with -XX:+UseRVV.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23256#discussion_r1926941483
More information about the hotspot-runtime-dev
mailing list