JDK-8269825 : [TESTBUG] Missing testing for x86 KNL platforms
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: x86
  • Submitted: 2021-07-02
  • Updated: 2022-11-23
  • Resolved: 2021-07-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 JDK 18
17 b30Fixed 18Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
In our testing environment we have x86 KVM virtualization with next CPUID features setting: 

CPU: total 8 (initial active 8) (4 cores per cpu, 2 threads per core) family 6 model 85 stepping 4 microcode 0x1, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, lzcnt, tsc, avx, avx2, aes, erms, clmul, bmi1, bmi2, rtm, adx, avx512f, avx512cd, fma, vzeroupper, clflush, hv 

It is similar to Knights family of X86 Intel CPU (KNL) which does not support some of avx512 features  (AVX512VL/BW) and have other restrictions.  We may not have such kind of machines in our testing environment and may miss bugs as JBS history shows (look recent fixes for KNL).

On other hand we have some Windows VM instances which have such configuration and limit avx512 instructions on CPU which supports full set. Recent bug JDK-8269775 shows such example.

I suggest to add -XX:+UseKNLSetting x86 diagnostic flag to emulate KNL CPU settings in HotSpot JVM to test such configuration.
Comments
Changeset: 0d1cd3a7 Author: Vladimir Kozlov <kvn@openjdk.org> Date: 2021-07-06 21:52:23 +0000 URL: https://git.openjdk.java.net/jdk17/commit/0d1cd3a7452a83f198d5d6eab0d4fbbaf44a302b
06-07-2021

Failures in tests compiler/vectorapi/VectorCastShape*Test.java are covered by JDK-8269952.
06-07-2021

Jatin wrote: Since the idea is to test KNL settings on any latest X86 Server platform we should also turn off following options. ``` if (is_intel()) { // Intel cpus specific settings if (is_knights_family()) { _features &= ~CPU_VZEROUPPER; _features &= ~CPU_AVX512BW; _features &= ~CPU_AVX512VL; + _features &= ~CPU_AVX512DQ; + _features &= ~CPU_AVX512_VNNI; + _features &= ~CPU_AVX512_VAES; + _features &= ~CPU_AVX512_VPOPCNTDQ; + _features &= ~CPU_AVX512_VPCLMULQDQ; + _features &= ~CPU_AVX512_VBMI; + _features &= ~CPU_AVX512_VBMI2; } } ``` -------------------------------------- Vladimir wrote: I think I should be more clear here. What I want to emulate is VM instance we use in our testing: ``` KVM virtualization detected CPU: total 8 (initial active 8) (4 cores per cpu, 2 threads per core) family 6 model 85 stepping 4 microcode 0x1, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, lzcnt, tsc, avx, avx2, aes, erms, clmul, bmi1, bmi2, rtm, adx, avx512f, avx512cd, fma, clflush, hv ``` And because current KNL flags setting is matching it I used it. I don't want to emulate exactly KNL CPU. Tests listed in 8269828 passed with additional KNL CPU features switched off as Jatin suggested. But it does not solve our internal testing issue. I will change bug's subject and flag name to be specific that it is VM emulation instead of KNL CPU.
06-07-2021

Filed JDK-8269828 for failure I found during testing.
02-07-2021

ILW = missing testing coverage = MLH = P4
02-07-2021