lkml.org 
[lkml]   [2009]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] per-CPU cryptd thread implementation based on workqueue
On Mon, Feb 02, 2009 at 11:30:25AM +0800, Huang Ying wrote:
>
> The only needed spin lock usage is cryptd_tfm_in_queue() now, I think we
> can protect that via RCU, what's your opinions?

We should just get rid of cryptd_tfm_in_queue since it's only used
for debugging.

> But I think the simplest method to pass requests to specified CPU is via
> work queue (queue_work_on()). We can add a function named
> cryptd_enqueue_request_on(), and construct a load-balance version cryptd
> on top of that.

That's fine by me. I'm not so worried whether the load-balancing
version exists as a template alongside cryptd or on top of cryptd.

However, the default cryptd should definitely not perform balancing.
Also note that not doing balancing does not mean that we only use
one CPU. cryptd should simply use the CPU on which the request was
received. So if the requests are received in parallel then the work
would be carried out in parallel.

The load-balancing version would also need to ensure that the
completion handlers are invoked in the exact order in which the
requests were received since this is crucial for IPsec.

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-02-02 04:47    [W:1.106 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site