]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use the fact that the AES-NI instructions can be pipelined to improve
authorJohn-Mark Gurney <jmg@FreeBSD.org>
Tue, 3 Sep 2013 18:31:23 +0000 (18:31 +0000)
committerJohn-Mark Gurney <jmg@FreeBSD.org>
Tue, 3 Sep 2013 18:31:23 +0000 (18:31 +0000)
commitff6c7bf5caf8ed045becae3eefcf2d23f18083af
tree70163365566d769ffe148062c84abb56725f25e7
parent003f0fa63f779bf3e5c2e43351a5c1dd91a7e627
Use the fact that the AES-NI instructions can be pipelined to improve
performance... Use SSE2 instructions for calculating the XTS tweek
factor...  Let the compiler do more work and handle register allocation
by using intrinsics, now only the key schedule is in assembly...

Replace .byte hard coded instructions w/ the proper instructions now
that both clang and gcc support them...

On my machine, pulling the code to userland I saw performance go from
~150MB/sec to 2GB/sec in XTS mode.  GELI on GNOP saw a more modest
increase of about 3x due to other system overhead (geom and
opencrypto)...

These changes allow almost full disk io rate w/ geli...

Reviewed by: -current, -security
Thanks to: Mike Hamburg for the XTS tweek algorithm
sys/conf/files.amd64
sys/conf/files.i386
sys/crypto/aesni/aesencdec.h [new file with mode: 0644]
sys/crypto/aesni/aesencdec_amd64.S [deleted file]
sys/crypto/aesni/aesencdec_i386.S [deleted file]
sys/crypto/aesni/aeskeys_amd64.S
sys/crypto/aesni/aesni.c
sys/crypto/aesni/aesni.h
sys/crypto/aesni/aesni_wrap.c
sys/modules/aesni/Makefile