JDK-8268276 : Base64 Decoding optimization for x86 using AVX-512
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: x86
  • Submitted: 2021-06-04
  • Updated: 2023-12-08
  • Resolved: 2021-06-25
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.0.6Fixed 18 b04Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Add the Base64 Decode intrinsic for x86 to utilize AVX-512 for acceleration.  Also allows for performance improvement for non-AVX-512 enabled platforms.  Due to the nature of MIME-encoded inputs, modify the intrinsic signature to accept an additional parameter (isMIME) for fast-path MIME decoding.
Comments
[17u] I can't completely follow the "low risk" rating because * The change touches a central algorithm * Assembly coding is error prone * A bug (8279999) could only be found by extensive testing that is not available to the open community * The backport has only been tested rudimentary (nothing comparable to the presumable load of a test called RunThese24H). Nevertheless, because of the large performance benefit in a central algorithm, the small difference between 17 and 18, and the fact that this is live in 18 for quite a while, I approve this. The following changes are backported along with this one: 8269404, 8273459, 8274527, 8279999. The five changes passed SAPs nightly testing.
09-11-2022

Fix Request 17u Backporting this patch adds accelerated Base64 decoding with AVX-512. Low risk as this has been in JDK18 for months. Patch applies cleanly to 17u. Testing: x86_64 build, affected tests, tier1
08-11-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/860 Date: 2022-11-08 01:18:18 +0000
08-11-2022

[17u] Hi, it is common practice to have dependent pull requests so that the changes match the changes in head.
03-11-2022

I opted to include the fix in this PR, as it was only three lines of code. Derek (@drwhite) has reviewed it and approves.
02-11-2022

[17u] I'll remove the tag in the meantime. Please add it again if the dependent PR is there. Thanks.
02-11-2022

Thanks, @Goetz. I'll add the dependent backport PR for this.
27-10-2022

[17u] Hi Scott, I think follow-up 8273108 is needed with this fix, isn't it? If so please make a dependent backport pull request for it.
27-10-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/840 Date: 2022-10-25 22:24:51 +0000
25-10-2022

Fix Request 17u We have had numerous customer requests for this functionality to be backported due to the ~19x performance improvement. Original patch does not apply cleanly to 17u, because of a bug that was identified in the original commit, but not fixed until the later Base64 Encode acceleration enhancement was complete. The fix is on line 6039 of src/hotspot/cpu/x86/stubGenerator_x86_64.cpp and has been included in this PR. All four "translatedX" registers needed to be checked for illegal characters in the input stream. Risk: I view the risk of this backport to be minimal. This code has been in use for many months with no bugs reported. Testing: x86_64 build, affected tests, tier1, tier2 Thanks, --Scott
25-10-2022

Changeset: c37988d0 Author: Scott Gibbons <scott.gibbons@intel.com> Committer: Sandhya Viswanathan <sviswanathan@openjdk.org> Date: 2021-06-25 03:19:48 +0000 URL: https://git.openjdk.java.net/jdk/commit/c37988d0793b24d98d285530dfda69999a227937
25-06-2021

Testing found one failure in compiler/intrinsics/base64/TestBase64.java test on Windows machine which have Intel 8167M cpu (AVX512). hs_err file is attached.
24-06-2021