summaryrefslogtreecommitdiff
path: root/crypto/drbg.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2014-05-27 10:28:55 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2014-06-20 21:26:05 +0800
commitfea435ea9c689a9870450e616b2fce719402b961 (patch)
treeb32c81389db85c345467832afd428b1c736d11dd /crypto/drbg.c
parent9b40a3dd3d4e3ff9904e049f6794c972b603272f (diff)
downloadlinux-crypto-fea435ea9c689a9870450e616b2fce719402b961.tar.gz
linux-crypto-fea435ea9c689a9870450e616b2fce719402b961.zip
crypto: lzo - try kmalloc() before vmalloc()
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:~# grep lzo /proc/vmallocinfo | head -4 0xffffc90006062000-0xffffc90006067000 20480 lzo_init+0x1b/0x30 pages=4 vmalloc N0=2 N1=2 0xffffc90006067000-0xffffc9000606c000 20480 lzo_init+0x1b/0x30 pages=4 vmalloc N0=2 N1=2 0xffffc9000606c000-0xffffc90006071000 20480 lzo_init+0x1b/0x30 pages=4 vmalloc N0=2 N1=2 0xffffc90006071000-0xffffc90006076000 20480 lzo_init+0x1b/0x30 pages=4 vmalloc N0=2 N1=2 This patch tries a regular kmalloc() and fallback to vmalloc in case memory is too fragmented. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/drbg.c')
0 files changed, 0 insertions, 0 deletions