Messages in this thread | | | Date | Sat, 18 Jan 2014 20:11:45 +0800 | From | Herbert Xu <> | Subject | Re: [PATCH RFC 1/2] crypto: Simple crypto algorithm load balancer |
| |
On Sat, Jan 18, 2014 at 12:46:08AM +0000, Tadeusz Struk wrote: > Hi, > In case of multiple crypto devices implementing the same algorithms > the arbitration, which one to use is based on the cra_priority. > Currently the algorithm with the highest priority is always be used. > In case of two algorithms with the same priority the one added last is used. > There is no load balancing and on a busy system there can be a situation when > there more crypto accelerators, but only one is used for all crypto jobs > and the others sit idle. > This patch implements a simple load balancing based on the priority > of an algorithm and its usage refctr. The distribution for 10 algorithms > and 3000000 tfm_alloc allocations is as follows:
Have you looked at pcrypt and whether it can be extended to handle this or perhaps something similar to pcrypt can be created?
Hard-coding this into the API seems a bit heavy-handed.
Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
| |