RFR: 8131062: aarch64: add support for GHASH acceleration
Edward Nevill
edward.nevill at gmail.com
Tue Jul 21 15:18:15 UTC 2015
Hi,
http://cr.openjdk.java.net/~enevill/8131062/webrev.0/
adds support for GHASH acceleration on aarch64 using the 128 bit pmull and pmull2 instructions.
This patch was contributed by alexander.alexeev at caviumnetworks.com
Note that the 128 pmull instructions are not supported on all aarch64. The patch uses the HWCAP_PMULL bit from getauxv() to determine whether the 128 bit pmull is supported.
I have tested this with jtreg / hotspot.
Without patch: Test results: passed: 876; failed: 3; error: 9
With patch: Test results: passed: 876; failed: 3; error: 9
In both cases the set of failing/error tests is identical.
I have done some performance testing using TestAESMain from the jtreg/hotspot test suite. Here are the results I get:-
java -XX:-UseGHASHIntrinsics -DcheckOutput=true -Dmode=GCM TestAESMain
encode time = 66945.63635, decode time = 34085.08754
java -XX:+UseGHASHIntrinsics -DcheckOutput=true -Dmode=GCM TestAESMain
encode time = 43469.38244, decode time = 17783.6603
This is an improvement of 54% and 92% respectively.
Alexander has done some benchmarking to measure the raw performance improvement of GHASH on its own using the following benchmark.
http://cr.openjdk.java.net/~enevill/8131062/GHash.java
Here are the results he gets:-
-XX:-UseGHASHIntrinsics.
Benchmark Mode Cnt Score Error Units
GHash.calculateGHash avgt 5 118.688 ? 0.009 us/op
-XX:+UseGHASHIntrinsics
Benchmark Mode Cnt Score Error Units
GHash.calculateGHash avgt 5 21.164 ? 1.763 us/op
This represents a 5.6X speed increase on the raw GHASH performance.
Thanks your your review,
Ed.
More information about the hotspot-compiler-dev
mailing list