From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>
Cc: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org
Subject: Re: [PATCH 2/2] crypto: pcrypt - Add pcrypt crypto parallelization wrapper
Date: Fri, 30 Oct 2009 11:06:09 +0100 [thread overview]
Message-ID: <20091030100609.GR15653@secunet.com> (raw)
In-Reply-To: <20091008.231833.107456737.davem@davemloft.net>
On Thu, Oct 08, 2009 at 11:18:33PM -0700, David Miller wrote:
>
> Steffen are we going to end up adding a softirq for every crypto
> transform type?
>
> That won't work, softirqs are to be scarcely allocated and operate
> at a very high level.
>
I changed padata to use workqueues instead of softirqs to do the
parallelization/serialization. The performance for IPsec is similar
to the softirq version, so probaply we don't need to use softirqs at
all.
While thinking about using workqueues for padata/pcrypt, I noticed
two problems if we return asynchronous in thread context from the
crypto-layer to xfrm. Returning in thread context is not new with
pcrypt, we also can return in thread context if we use the cryptd.
If we use tunnel mode, xfrm_input() calls netif_rx() which is certainly
wrong if we are in thread context, we need to call netif_rx_ni() instead.
Also xfrm_input() uses bare spinlocks to protect the xfrm_state, this is
not appropriate in this case. We probaply need to switch off the bottom
halves, if we allow to return from the cypto-layer in softirq and thread
context.
Any thoughts on how to handle this?
next prev parent reply other threads:[~2009-10-30 10:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-08 7:25 [PATCH 0/2] Parallel crypto/IPsec v6 Steffen Klassert
2009-10-08 7:27 ` [PATCH 1/2] padata: generic interface for parallel processing Steffen Klassert
2009-10-08 7:28 ` [PATCH 2/2] crypto: pcrypt - Add pcrypt crypto parallelization wrapper Steffen Klassert
2009-10-09 6:18 ` David Miller
2009-10-09 8:07 ` Steffen Klassert
2009-10-30 10:06 ` Steffen Klassert [this message]
2009-10-30 12:58 ` Herbert Xu
2009-10-30 13:27 ` Steffen Klassert
2009-10-30 13:30 ` Herbert Xu
2009-11-02 11:36 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2009-12-21 14:19 workqueue thing Tejun Heo
2009-12-21 15:19 ` Arjan van de Ven
2009-12-22 0:00 ` Tejun Heo
2009-12-22 11:10 ` Peter Zijlstra
2009-12-22 17:20 ` Linus Torvalds
2009-12-22 17:47 ` Peter Zijlstra
2009-12-23 3:37 ` Tejun Heo
2009-12-23 6:52 ` Herbert Xu
2009-12-23 8:00 ` Steffen Klassert
2009-12-23 8:01 ` [PATCH 0/2] Parallel crypto/IPsec v7 Steffen Klassert
2009-12-23 8:04 ` [PATCH 2/2] crypto: pcrypt - Add pcrypt crypto parallelization wrapper Steffen Klassert
2009-12-18 12:20 [PATCH 0/2] Parallel crypto/IPsec v7 Steffen Klassert
2009-12-18 12:21 ` [PATCH 2/2] crypto: pcrypt - Add pcrypt crypto parallelization wrapper Steffen Klassert
2009-08-31 9:11 [PATCH 0/2] Parallel crypto/IPsec v5 Steffen Klassert
2009-08-31 9:14 ` [PATCH 2/2] crypto: pcrypt - Add pcrypt crypto parallelization wrapper Steffen Klassert
2009-09-19 23:20 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091030100609.GR15653@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.