[PATCH] crypto: lzo: try kmalloc() before vmalloc()

2014-05-27 Thread Eric Dumazet
From: Eric Dumazet zswap allocates one LZO context per online cpu. Using vmalloc() for small (16KB) memory areas has drawback of slowing down /proc/vmallocinfo and /proc/meminfo reads, TLB pressure and poor NUMA locality, as default NUMA policy at boot time is to interleave pages : edumazet:~#

Re: [PATCH] crypto: lzo: try kmalloc() before vmalloc()

2014-05-27 Thread Herbert Xu
On Tue, May 27, 2014 at 10:28:55AM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > zswap allocates one LZO context per online cpu. > > Using vmalloc() for small (16KB) memory areas has drawback of slowing > down /proc/vmallocinfo and /proc/meminfo reads, TLB pressure and poor > NUMA locality

Re: [PATCH] crypto: lzo: try kmalloc() before vmalloc()

2014-05-27 Thread Eric Dumazet
On Wed, 2014-05-28 at 01:30 +0800, Herbert Xu wrote: > Looks good to me. This would seem like something that could be > generalised to other vmalloc users, no? > Yep, we have some spots where this is done, and we had attempts in the past to get a generic allocator / deallocator but this went no

[PATCH] crypto: caam: Introduce the use of the managed version of kzalloc

2014-05-27 Thread Himangi Saraogi
This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. Also, linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. Earlier, in the probe function ctrlp

RFC: 2 pages are enough for xor speed testing

2014-05-27 Thread Amos Kong
In crypto/xor.c: calibrate_xor_blocks(), we allocated total 4 pages to do xor speed testing, the BENCH_SIZE is 1 page. Why do we skip 2 pages when we set *b2? It seems that total 2 pages are enough. diff --git a/crypto/xor.c b/crypto/xor.c index 35d6b3a..38421a1 100644 --- a/crypto/xor.c +++ b/cr