1. 19 May, 2010 8 commits
    • David S. Miller's avatar
      crypto: tcrypt - Add speed tests for async hashing · beb63da7
      David S. Miller authored
      These are invoked in the 'mode' range of 400 to 499.
      
      The cost of async vs. sync for the software algorithm implementations
      varies.  It can be as low as 16 cycles but as much as a couple hundred.
      
      Here two runs of md5 testing, async then sync:
      
      testing speed of async md5
      test  0 (   16 byte blocks,   16 bytes per update,   1 updates):   2448 cycles/operation,  153 cycles/byte
      test  1 (   64 byte blocks,   16 bytes per update,   4 updates):   4992 cycles/operation,   78 cycles/byte
      test  2 (   64 byte blocks,   64 bytes per update,   1 updates):   3808 cycles/operation,   59 cycles/byte
      test  3 (  256 byte blocks,   16 bytes per update,  16 updates):  14000 cycles/operation,   54 cycles/byte
      test  4 (  256 byte blocks,   64 bytes per update,   4 updates):   8480 cycles/operation,   33 cycles/byte
      test  5 (  256 byte blocks,  256 bytes per update,   1 updates):   7280 cycles/operation,   28 cycles/byte
      test  6 ( 1024 byte blocks,   16 bytes per update,  64 updates):  50016 cycles/operation,   48 cycles/byte
      test  7 ( 1024 byte blocks,  256 bytes per update,   4 updates):  22496 cycles/operation,   21 cycles/byte
      test  8 ( 1024 byte blocks, 1024 bytes per update,   1 updates):  21232 cycles/operation,   20 cycles/byte
      test  9 ( 2048 byte blocks,   16 bytes per update, 128 updates): 117184 cycles/operation,   57 cycles/byte
      test 10 ( 2048 byte blocks,  256 bytes per update,   8 updates):  43008 cycles/operation,   21 cycles/byte
      test 11 ( 2048 byte blocks, 1024 bytes per update,   2 updates):  40176 cycles/operation,   19 cycles/byte
      test 12 ( 2048 byte blocks, 2048 bytes per update,   1 updates):  39888 cycles/operation,   19 cycles/byte
      test 13 ( 4096 byte blocks,   16 bytes per update, 256 updates): 194176 cycles/operation,   47 cycles/byte
      test 14 ( 4096 byte blocks,  256 bytes per update,  16 updates):  84096 cycles/operation,   20 cycles/byte
      test 15 ( 4096 byte blocks, 1024 bytes per update,   4 updates):  78336 cycles/operation,   19 cycles/byte
      test 16 ( 4096 byte blocks, 4096 bytes per update,   1 updates):  77120 cycles/operation,   18 cycles/byte
      test 17 ( 8192 byte blocks,   16 bytes per update, 512 updates): 403056 cycles/operation,   49 cycles/byte
      test 18 ( 8192 byte blocks,  256 bytes per update,  32 updates): 166112 cycles/operation,   20 cycles/byte
      test 19 ( 8192 byte blocks, 1024 bytes per update,   8 updates): 154768 cycles/operation,   18 cycles/byte
      test 20 ( 8192 byte blocks, 4096 bytes per update,   2 updates): 151904 cycles/operation,   18 cycles/byte
      test 21 ( 8192 byte blocks, 8192 bytes per update,   1 updates): 155456 cycles/operation,   18 cycles/byte
      
      testing speed of md5
      test  0 (   16 byte blocks,   16 bytes per update,   1 updates):   2208 cycles/operation,  138 cycles/byte
      test  1 (   64 byte blocks,   16 bytes per update,   4 updates):   5008 cycles/operation,   78 cycles/byte
      test  2 (   64 byte blocks,   64 bytes per update,   1 updates):   3600 cycles/operation,   56 cycles/byte
      test  3 (  256 byte blocks,   16 bytes per update,  16 updates):  14080 cycles/operation,   55 cycles/byte
      test  4 (  256 byte blocks,   64 bytes per update,   4 updates):   8560 cycles/operation,   33 cycles/byte
      test  5 (  256 byte blocks,  256 bytes per update,   1 updates):   7040 cycles/operation,   27 cycles/byte
      test  6 ( 1024 byte blocks,   16 bytes per update,  64 updates):  50592 cycles/operation,   49 cycles/byte
      test  7 ( 1024 byte blocks,  256 bytes per update,   4 updates):  22736 cycles/operation,   22 cycles/byte
      test  8 ( 1024 byte blocks, 1024 bytes per update,   1 updates):  24960 cycles/operation,   24 cycles/byte
      test  9 ( 2048 byte blocks,   16 bytes per update, 128 updates):  99312 cycles/operation,   48 cycles/byte
      test 10 ( 2048 byte blocks,  256 bytes per update,   8 updates):  43520 cycles/operation,   21 cycles/byte
      test 11 ( 2048 byte blocks, 1024 bytes per update,   2 updates):  40704 cycles/operation,   19 cycles/byte
      test 12 ( 2048 byte blocks, 2048 bytes per update,   1 updates):  39552 cycles/operation,   19 cycles/byte
      test 13 ( 4096 byte blocks,   16 bytes per update, 256 updates): 196720 cycles/operation,   48 cycles/byte
      test 14 ( 4096 byte blocks,  256 bytes per update,  16 updates):  85152 cycles/operation,   20 cycles/byte
      test 15 ( 4096 byte blocks, 1024 bytes per update,   4 updates):  79408 cycles/operation,   19 cycles/byte
      test 16 ( 4096 byte blocks, 4096 bytes per update,   1 updates):  76816 cycles/operation,   18 cycles/byte
      test 17 ( 8192 byte blocks,   16 bytes per update, 512 updates): 391520 cycles/operation,   47 cycles/byte
      test 18 ( 8192 byte blocks,  256 bytes per update,  32 updates): 168464 cycles/operation,   20 cycles/byte
      test 19 ( 8192 byte blocks, 1024 bytes per update,   8 updates): 156912 cycles/operation,   19 cycles/byte
      test 20 ( 8192 byte blocks, 4096 bytes per update,   2 updates): 154016 cycles/operation,   18 cycles/byte
      test 21 ( 8192 byte blocks, 8192 bytes per update,   1 updates): 153856 cycles/operation,   18 cycles/byte
      
      We can ditch the sync hash code at some point if we feel that makes
      sense.  For now I've left it there.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      beb63da7
    • David S. Miller's avatar
      crypto: scatterwalk - Fix scatterwalk_done() test · 85c6201a
      David S. Miller authored
      We are done with the scattergather entry when the walk offset goes
      past sg->offset + sg->length, not when it crosses a page boundary.
      
      There is a similarly queer test in the second half of
      scatterwalk_pagedone() that probably needs some scrutiny.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      85c6201a
    • David S. Miller's avatar
      crypto: hifn_795x - Rename ablkcipher_walk to hifn_cipher_walk · 3385329a
      David S. Miller authored
      This is in preparation for the generic ablkcipher_walk helpers that
      will be added to the crypto layer.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      3385329a
    • Steffen Klassert's avatar
      padata: Use get_online_cpus/put_online_cpus in padata_free · 3789ae7d
      Steffen Klassert authored
      Add get_online_cpus/put_online_cpus to ensure that no cpu goes
      offline during the flushing of the padata percpu queues.
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      3789ae7d
    • Steffen Klassert's avatar
    • Steffen Klassert's avatar
      padata: Flush the padata queues actively · 2b73b07a
      Steffen Klassert authored
      yield was used to wait until all references of the internal control
      structure in use are dropped before it is freed. This patch implements
      padata_flush_queues which actively flushes the padata percpu queues
      in this case.
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      2b73b07a
    • Steffen Klassert's avatar
      padata: Use a timer to handle remaining objects in the reorder queues · d46a5ac7
      Steffen Klassert authored
      padata_get_next needs to check whether the next object that
      need serialization must be parallel processed by the local cpu.
      This check was wrong implemented and returned always true,
      so the try_again loop in padata_reorder was never taken. This
      can lead to object leaks in some rare cases due to a race that
      appears with the trylock in padata_reorder. The try_again loop
      was not a good idea after all, because a cpu could take that
      loop frequently, so we handle this with a timer instead.
      
      This patch adds a timer to handle the race that appears with
      the trylock. If cpu1 queues an object to the reorder queue while
      cpu2 holds the pd->lock but left the while loop in padata_reorder
      already, cpu2 can't care for this object and cpu1 exits because
      it can't get the lock. Usually the next cpu that takes the lock
      cares for this object too. We need the timer just if this object
      was the last one that arrives to the reorder queues. The timer
      function sends it out in this case.
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      d46a5ac7
    • Herbert Xu's avatar
      crypto: shash - Remove usage of CRYPTO_MINALIGN · 18eb8ea6
      Herbert Xu authored
      The macro CRYPTO_MINALIGN is not meant to be used directly.  This
      patch replaces it with crypto_tfm_ctx_alignment.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      18eb8ea6
  2. 14 May, 2010 2 commits
  3. 03 May, 2010 9 commits
  4. 30 Apr, 2010 21 commits