-
Bug
-
Resolution: Fixed
-
P4
-
25, 26
-
b17
-
riscv
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8368628 | 25.0.2 | Fei Yang | P4 | Resolved | Fixed | master |
According to the latest RISC-V linux hardware probing syscall [1], the performance of misaligned memory accesses
has been divided into two cases: RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF and RISCV_HWPROBE_KEY_MISALIGNED_VECTOR_PERF
for scalar and vector respectively. And RISCV_HWPROBE_KEY_CPUPERF_0 is deprecated and it now returns similar values
to RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF.
Previously, we use RISCV_HWPROBE_KEY_CPUPERF_0 to detect support for misaligned memory accesses and reflect the result
on VM flags like AvoidUnalignedAccesses, UseUnalignedAccesses and AlignVector. But it doesn't seem correct to update
AlignVector according to this value. And this is causing issues on hardwares which have fast misaligned accesses only
for scalar. I see they will trigger SIGBUG error in the case of vector misaligned accesses.
[1] https://docs.kernel.org/arch/riscv/hwprobe.html
has been divided into two cases: RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF and RISCV_HWPROBE_KEY_MISALIGNED_VECTOR_PERF
for scalar and vector respectively. And RISCV_HWPROBE_KEY_CPUPERF_0 is deprecated and it now returns similar values
to RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF.
Previously, we use RISCV_HWPROBE_KEY_CPUPERF_0 to detect support for misaligned memory accesses and reflect the result
on VM flags like AvoidUnalignedAccesses, UseUnalignedAccesses and AlignVector. But it doesn't seem correct to update
AlignVector according to this value. And this is causing issues on hardwares which have fast misaligned accesses only
for scalar. I see they will trigger SIGBUG error in the case of vector misaligned accesses.
[1] https://docs.kernel.org/arch/riscv/hwprobe.html
- backported by
-
JDK-8368628 RISC-V: AlignVector is mistakenly set to AvoidUnalignedAccesses
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk25u/74c06848
-
Commit(master) openjdk/jdk/2313f8e4
-
Review(master) openjdk/jdk25u/238
-
Review(master) openjdk/jdk/27445