RFR (M): 8143925: Enhancing CounterMode.crypt() for AES

Anthony Scarpino anthony.scarpino at oracle.com
Wed Nov 25 21:40:28 UTC 2015


Hi Kishor,

I'm do not have reviewer status, but I have just a few comments.

1) I think UseAESCTRIntrinsic for the CLI option is a better choice. 
More natural flow of <algorithm><mode> combination.

2) It would be good to add CTR to the TestAES tests.  It's in 
hotspot/test/compiler/codegen/7184394/.  The test currently has CBC, 
ECB, and GCM in it, so it should be easy.  It's also the only test I 
know of that tests the intrinsic.  None of the tests in the jdk repo 
that I know of loop enough to trigger the intrinsic.

3) Obviously .hgignore got added into the jdk webrev, just as long as it 
doesn't get mistakenly added :)

Tony

On 11/24/2015 02:33 PM, Kharbas, Kishor wrote:
> Hello all,
>
> I request the community to review a patch for enhancing
> CounterMode.crypt() for AES. This patch defines intrinsic for
> CounterMode.crypt() to leverage the parallel nature of AES in Counter
> (CTR) Mode.
>
> This is achieved by operating on 6 blocks in parallel to issue
> independent x86 AES-NI instructions and keep the CPU pipeline full.
>
> Testing on micro-benchmark has shown a speedup of 4x-6x.
>
> Bug id:
>
>     https://bugs.openjdk.java.net/browse/JDK-8143925
>
> Webrev:
>
>    hotspot: http://cr.openjdk.java.net/~mcberg/8143925/hotspot/webrev.02/
>
>    jdk: http://cr.openjdk.java.net/~mcberg/8143925/jdk/webrev.01/
>
> Much appreciated!
>
> Kishor Kharbas
>



More information about the hotspot-compiler-dev mailing list