On Fri, Feb 27, 2015 at 11:35:49AM -0800, Tadeusz Struk wrote:
>
> +static int skcipher_mempool_create(struct sock *sk)
> +{
> + struct alg_sock *ask = alg_sk(sk);
> + struct skcipher_ctx *ctx = ask->private;
> + unsigned int len = sizeof(struct skcipher_async_req) +
> + GET_REQ_SIZE(ctx) + GET_IV_SIZE(ctx);
> + char buf[32];
> +
> + snprintf(buf, sizeof(buf), "skcipher_%p", ctx);
> + ctx->cache = kmem_cache_create(buf, len, 0, SLAB_HWCACHE_ALIGN |
> + SLAB_TEMPORARY,
> + skcipher_cache_constructor);
Are these separate caches really necessary? It looks like an
overkill. What's wrong with just kmalloc?
Cheers,
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html