Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1433540
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] crypto: tcrypt - Fix memory leaks/crashes in multibuffer hash speed test |
| Date | 2016-06-29 10:20 +0200 |
| Message-ID | <rPiT0-1Lg-21@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <rOWSt-4vW-3@gated-at.bofh.it> <rOWSt-4vW-17@gated-at.bofh.it> <rOXYd-5cW-7@gated-at.bofh.it> <rOZdD-6hk-11@gated-at.bofh.it> <rP0t5-730-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/28/2016 02:33 PM, Herbert Xu wrote: > On Tue, Jun 28, 2016 at 12:15:43PM +0200, Krzysztof Kozlowski wrote: >> Oops: > > Thanks, there was a typo where it said k instead of j in the second > loop. > > ---8<--- > This patch resolves a number of issues with the mb speed test > function: > > * The tfm is never freed. > * Memory is allocated even when we're not using mb. > * When an error occurs we don't wait for completion for other requests. > * When an error occurs during allocation we may leak memory. > * The test function ignores plen but still runs for plen != blen. > * The backlog flag is incorrectly used (may crash). > > This patch tries to resolve all these issues as well as making > the code consistent with the existing hash speed testing function. > > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Seems to work fine except: 1. The updates are always 1. 2. For bigger blocks it reports always 1 or 3 cycles per byte: [root@odroidxu3 ~]# modprobe tcrypt mode=423 [ 70.129206] [ 70.129206] testing speed of multibuffer sha256 (sha256-neon) [ 70.135511] test 0 ( 16 byte blocks, 16 bytes per update, 1 updates): 4597 cycles/operation, 35 cycles/byte [ 70.145826] test 2 ( 64 byte blocks, 64 bytes per update, 1 updates): 5762 cycles/operation, 11 cycles/byte [ 70.156469] test 5 ( 256 byte blocks, 256 bytes per update, 1 updates): 10687 cycles/operation, 5 cycles/byte [ 70.167125] test 8 ( 1024 byte blocks, 1024 bytes per update, 1 updates): 31485 cycles/operation, 3 cycles/byte [ 70.177919] test 12 ( 2048 byte blocks, 2048 bytes per update, 1 updates): 59281 cycles/operation, 3 cycles/byte [ 70.189780] test 16 ( 4096 byte blocks, 4096 bytes per update, 1 updates): 118097 cycles/operation, 3 cycles/byte [ 70.204117] test 21 ( 8192 byte blocks, 8192 bytes per update, 1 updates): 232309 cycles/operation, 3 cycles/byte [root@odroidxu3 ~]# modprobe tcrypt mode=422 [ 71.988248] [ 71.988248] testing speed of multibuffer sha1 (sha1-neon) [ 71.994097] test 0 ( 16 byte blocks, 16 bytes per update, 1 updates): 2506 cycles/operation, 19 cycles/byte [ 72.004547] test 2 ( 64 byte blocks, 64 bytes per update, 1 updates): 2299 cycles/operation, 4 cycles/byte [ 72.015152] test 5 ( 256 byte blocks, 256 bytes per update, 1 updates): 3535 cycles/operation, 1 cycles/byte [ 72.025807] test 8 ( 1024 byte blocks, 1024 bytes per update, 1 updates): 9403 cycles/operation, 1 cycles/byte [ 72.036401] test 12 ( 2048 byte blocks, 2048 bytes per update, 1 updates): 17142 cycles/operation, 1 cycles/byte [ 72.047058] test 16 ( 4096 byte blocks, 4096 bytes per update, 1 updates): 33109 cycles/operation, 1 cycles/byte [ 72.057821] test 21 ( 8192 byte blocks, 8192 bytes per update, 1 updates): 67750 cycles/operation, 1 cycles/byte modprobe: ERROR: could not insert 'tcrypt': Resource temporarily unavailable Is it expected? Best regards, Krzysztof
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] crypto: tcrypt: Fix mixing printk/pr_err and obvious indentation issues Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-28 09:30 +0200
[PATCH 2/2] crypto: tcrypt: Fix linkage error on ARM on division of s64 Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-28 09:30 +0200
Re: [PATCH 2/2] crypto: tcrypt: Fix linkage error on ARM on division of s64 Herbert Xu <herbert@gondor.apana.org.au> - 2016-06-28 10:50 +0200
Re: [PATCH 2/2] crypto: tcrypt: Fix linkage error on ARM on division of s64 Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-28 10:50 +0200
crypto: tcrypt - Fix memory leaks/crashes in multibuffer hash speed test Herbert Xu <herbert@gondor.apana.org.au> - 2016-06-28 12:00 +0200
Re: crypto: tcrypt - Fix memory leaks/crashes in multibuffer hash speed test Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-28 13:20 +0200
[PATCH v2] crypto: tcrypt - Fix memory leaks/crashes in multibuffer hash speed test Herbert Xu <herbert@gondor.apana.org.au> - 2016-06-28 14:40 +0200
Re: [PATCH v2] crypto: tcrypt - Fix memory leaks/crashes in multibuffer hash speed test Herbert Xu <herbert@gondor.apana.org.au> - 2016-06-29 10:20 +0200
Re: [PATCH v2] crypto: tcrypt - Fix memory leaks/crashes in multibuffer hash speed test Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-29 10:30 +0200
Re: [PATCH v2] crypto: tcrypt - Fix memory leaks/crashes in multibuffer hash speed test Megha Dey <megha.dey@linux.intel.com> - 2016-06-29 19:50 +0200
crypto: tcrypt - Do not bail on EINPROGRESS in multibuffer hash test Herbert Xu <herbert@gondor.apana.org.au> - 2016-06-30 05:10 +0200
Re: crypto: tcrypt - Do not bail on EINPROGRESS in multibuffer hash test Megha Dey <megha.dey@linux.intel.com> - 2016-06-30 19:40 +0200
Re: [PATCH v2] crypto: tcrypt - Fix memory leaks/crashes in multibuffer hash speed test Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-29 10:20 +0200
Re: [PATCH 1/2] crypto: tcrypt: Fix mixing printk/pr_err and obvious indentation issues Herbert Xu <herbert@gondor.apana.org.au> - 2016-06-28 10:40 +0200
csiph-web