android_kernel_samsung_msm8976/crypto
Jussi Kivilinna 8280daad43 crypto: twofish - add 3-way parallel x86_64 assembler implemention
Patch adds 3-way parallel x86_64 assembly implementation of twofish as new
module. New assembler functions crypt data in three blocks chunks, improving
cipher performance on out-of-order CPUs.

Patch has been tested with tcrypt and automated filesystem tests.

Summary of the tcrypt benchmarks:

Twofish 3-way-asm vs twofish asm (128bit 8kb block ECB)
 encrypt: 1.3x speed
 decrypt: 1.3x speed

Twofish 3-way-asm vs twofish asm (128bit 8kb block CBC)
 encrypt: 1.07x speed
 decrypt: 1.4x speed

Twofish 3-way-asm vs twofish asm (128bit 8kb block CTR)
 encrypt: 1.4x speed

Twofish 3-way-asm vs AES asm (128bit 8kb block ECB)
 encrypt: 1.0x speed
 decrypt: 1.0x speed

Twofish 3-way-asm vs AES asm (128bit 8kb block CBC)
 encrypt: 0.84x speed
 decrypt: 1.09x speed

Twofish 3-way-asm vs AES asm (128bit 8kb block CTR)
 encrypt: 1.15x speed

Full output:
 http://koti.mbnet.fi/axh/kernel/crypto/tcrypt-speed-twofish-3way-asm-x86_64.txt
 http://koti.mbnet.fi/axh/kernel/crypto/tcrypt-speed-twofish-asm-x86_64.txt
 http://koti.mbnet.fi/axh/kernel/crypto/tcrypt-speed-aes-asm-x86_64.txt

Tests were run on:
 vendor_id  : AuthenticAMD
 cpu family : 16
 model      : 10
 model name : AMD Phenom(tm) II X6 1055T Processor

Also userspace test were run on:
 vendor_id  : GenuineIntel
 cpu family : 6
 model      : 15
 model name : Intel(R) Xeon(R) CPU           E7330  @ 2.40GHz
 stepping   : 11

Userspace test results:

Encryption/decryption of twofish 3-way vs x86_64-asm on AMD Phenom II:
 encrypt: 1.27x
 decrypt: 1.25x

Encryption/decryption of twofish 3-way vs x86_64-asm on Intel Xeon E7330:
 encrypt: 1.36x
 decrypt: 1.36x

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2011-10-21 14:23:08 +02:00
..
async_tx net: remove mm.h inclusion from netdevice.h 2011-06-21 19:17:20 -07:00
ablkcipher.c crypto: skcipher - remove redundant NULL check 2011-01-29 15:09:43 +11:00
aead.c
aes_generic.c
af_alg.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
ahash.c
algapi.c
algboss.c
algif_hash.c crypto: algif_hash - Handle initial af_alg_make_sg error correctly 2011-06-30 07:44:06 +08:00
algif_skcipher.c crypto: algif_skcipher - Handle unaligned receive buffer 2010-11-30 17:04:31 +08:00
ansi_cprng.c Fix common misspellings 2011-03-31 11:26:23 -03:00
anubis.c
api.c
arc4.c crypto: arc4 - Fixed coding style issues 2011-06-30 07:44:05 +08:00
authenc.c crypto: Use scatterwalk_crypto_chain 2010-12-02 14:47:16 +08:00
authencesn.c crypto: authencesn - Add algorithm to handle IPsec extended sequence numbers 2011-03-13 20:22:27 -07:00
blkcipher.c
blowfish_common.c crypto: blowfish - split generic and common c code 2011-09-22 21:25:25 +10:00
blowfish_generic.c crypto: blowfish - rename C-version to blowfish_generic 2011-09-22 21:25:26 +10:00
camellia.c
cast5.c
cast6.c
cbc.c
ccm.c
chainiv.c
cipher.c
compress.c
crc32c.c crypto: crc32c - Fixed coding style issue 2011-06-30 07:44:05 +08:00
cryptd.c crypto: cryptd - Use subsys_initcall to prevent races with aesni 2011-08-20 16:08:03 +08:00
crypto_null.c
crypto_wq.c crypto: mark crypto workqueues CPU_INTENSIVE 2011-01-04 23:34:08 +11:00
ctr.c
cts.c
deflate.c net+crypto: Use vmalloc for zlib inflate buffers. 2011-06-29 05:48:41 -07:00
des_generic.c
ecb.c
eseqiv.c crypto: Use scatterwalk_crypto_chain 2010-12-02 14:47:16 +08:00
fcrypt.c
fips.c
gcm.c crypto: Use scatterwalk_crypto_chain 2010-12-02 14:47:16 +08:00
gf128mul.c crypto: gf128mul - fix call to memset() 2011-07-08 17:21:21 +08:00
ghash-generic.c
hmac.c
internal.h
Kconfig crypto: twofish - add 3-way parallel x86_64 assembler implemention 2011-10-21 14:23:08 +02:00
khazad.c
krng.c
lrw.c
lzo.c
Makefile crypto: blowfish - rename C-version to blowfish_generic 2011-09-22 21:25:26 +10:00
md4.c
md5.c
michael_mic.c
pcbc.c
pcompress.c
pcrypt.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2011-01-13 10:25:58 -08:00
proc.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
ripemd.h
rmd128.c crypto: ripemd - Set module author and update email address 2011-01-04 23:34:03 +11:00
rmd160.c crypto: ripemd - Set module author and update email address 2011-01-04 23:34:03 +11:00
rmd256.c crypto: ripemd - Set module author and update email address 2011-01-04 23:34:03 +11:00
rmd320.c crypto: ripemd - Set module author and update email address 2011-01-04 23:34:03 +11:00
rng.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
salsa20_generic.c
scatterwalk.c
seed.c
seqiv.c
serpent.c
sha1_generic.c crypto: sha1 - export sha1_update for reuse 2011-08-10 19:00:28 +08:00
sha256_generic.c
sha512_generic.c
shash.c
tcrypt.c crypto: tcrypt - add ctr(twofish) speed test 2011-10-21 14:23:08 +02:00
tcrypt.h
tea.c
testmgr.c crypto: testmgr - add support for aes ofb mode 2011-05-04 15:04:10 +10:00
testmgr.h crypto: testmgr - add xts-aes-256 self-test 2011-06-30 07:44:00 +08:00
tgr192.c
twofish_common.c
twofish_generic.c
vmac.c Fix common misspellings 2011-03-31 11:26:23 -03:00
wp512.c
xcbc.c
xor.c
xts.c Fix common misspellings 2011-03-31 11:26:23 -03:00
zlib.c net+crypto: Use vmalloc for zlib inflate buffers. 2011-06-29 05:48:41 -07:00