On Sun, 8 Oct 2023 06:18:13 GMT, Danny Thomas <d...@openjdk.org> wrote:

>> Srinivas Vamsi Parasa has updated the pull request with a new target base 
>> due to a merge or a rebase. The pull request now contains 45 commits:
>> 
>>  - fix code style and formatting
>>  - Merge branch 'master' of https://git.openjdk.java.net/jdk into avx512sort
>>  - Update CompileThresholdScaling only for the sort and partition 
>> intrinsics; update build script to remove nested if
>>  - change variable names of indexPivot* to pivotIndex*
>>  - Update DualPivotQuicksort.java
>>  - Rename arraySort and arrayPartition Java methods to sort and partition. 
>> Cleanup some comments
>>  - Remove the unnecessary exception in single pivot partitioning fallback 
>> method
>>  - Move functional interfaces close to the associated methods
>>  - Refactor the sort and partition intrinsics to accept method references 
>> for fallback functions
>>  - Refactor stub handling to use a generic function for all types
>>  - ... and 35 more: https://git.openjdk.org/jdk/compare/a1c9587c...a5262d86
>
> A [discussion on 
> Reddit](https://www.reddit.com/r/java/comments/171t5sj/heads_up_openjdk_implementation_of_avx512_based/)
>  raised that this had the potential to regress sort performance on AMD Zen 4. 
> The poster didn't have access to Zen 4 hardware, so I took a moment to run 
> the benchmark, comparing against a baseline with `UseAVX=2` on an AWS 
> `m7a.2xlarge`:
> 
> 
> processor     : 0
> vendor_id     : AuthenticAMD
> cpu family    : 25
> model         : 17
> model name    : AMD EPYC 9R14
> stepping      : 1
> microcode     : 0xa10113e
> cpu MHz               : 3673.537
> cache size    : 1024 KB
> physical id   : 0
> siblings      : 8
> core id               : 0
> cpu cores     : 8
> apicid                : 0
> initial apicid        : 0
> fpu           : yes
> fpu_exception : yes
> cpuid level   : 16
> wp            : yes
> flags         : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
> pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb 
> rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf 
> tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic 
> movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy 
> cr8_legacy abm sse4a misalignsse 3dnowprefetch topoext perfctr_core 
> invpcid_single ssbd perfmon_v2 ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 
> smep bmi2 invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb 
> avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512_bf16 
> clzero xsaveerptr rdpru wbnoinvd arat avx512vbmi pku ospke avx512_vbmi2 gfni 
> vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid flush_l1d
> bugs          : sysret_ss_attrs spectre_v1 spectre_v2 spec_store_bypass
> bogomips      : 5200.00
> TLB size      : 3584 4K pages
> clflush size  : 64
> cache_alignment       : 64
> address sizes : 48 bits physical, 48 bits virtual
> power management:
> 
> 
> 
> $ make test TEST="micro:java.lang.ArraysSort.intSort"
> 
> Benchmark            (size)  Mode  Cnt      Score     Error  Units
> ArraysSort.intSort       10  avgt    3      0.033 ?   0.001  us/op
> ArraysSort.intSort       25  avgt    3      0.067 ?   0.002  us/op
> ArraysSort.intSort       50  avgt    3      0.391 ?   0.007  us/op
> ArraysSort.intSort       75  avgt    3      0.923 ?   0.041  us/op
> ArraysSort.intSort      100  avgt    3      1.292 ?   0.009  us/op
> ArraysSort.intSort     1000  avgt    3     24.268 ?   0.078  us/op
> ArraysSort.intSort    10000  avgt    3    320.131 ?   0.381  us/op
> ArraysSort.intSort   100000  avgt    3   4803.142 ?  63.901  us/op
> ArraysSort.intSort  1000000  avgt    3  61457.708 ? 347.446  us/op
> 
> 
> 
> $ make test TEST="micro:java.lang.ArraysSort.intSort" MICRO...

@DanielThomas thank you, i was not aware of the limitation on AMD Zen 4. We 
need to address this and it appears the fix is simple and localized. Thankfully 
we are early into the JDK 22 development cycle so we have time to shake this 
out.

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

PR Comment: https://git.openjdk.org/jdk/pull/14227#issuecomment-1753412092

Reply via email to