lkml.org 
[lkml]   [2009]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH crypto 4/4] AES-NI: Add support to Intel AES-NI instructions for x86_64 platform
On Fri, Jan 09, 2009 at 04:54:33PM +0800, Huang Ying wrote:
>
> - cryptd thread is not per-CPU, so I think there will be some
> unnecessary cache inter-CPU migration. Why not use a dedicate workqueue

Well it shouldn't be hard to make cryptd per-cpu.

> or just system events workqueue?

That's actually bad because the system events queue is a shared
resource which is often subject to starvation problems. On the
one hand we may be starved by others and we may also starve others
by doing too much crypto.

> - with cryptd(__*-aes-aesni), we need 4 internal tfms for each external
> tfm allocation request. For example, for one external cbc(aes) tfm
> allocation request, we need one cbc(aes) ablkcipher tfm, one
> cryptd(cbc-aes-aesni) tfm, and two cbc-aes-aesni tfm. Do we use too much
> memory? And we need to call aesni_set_key() twice.

Not at all, tfms are just "shell" objects and they were designed
to be used in thie way. Calling setkey twice is an issue but it's
not a show-stopper. We have the same problem in other places to
so this something that we can potentially optimise.

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


\
 
 \ /
  Last update: 2009-01-09 10:21    [W:0.140 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site