public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@MIT.EDU>
To: Herbert Xu <herbert@gondor.hengli.com.au>
Cc: Mathias Krause <minipli@googlemail.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org,
	Maxim Locktyukhin <maxim.locktyukhin@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] crypto, x86: SSSE3 based SHA1 implementation for x86-64
Date: Thu, 11 Aug 2011 10:50:49 -0400	[thread overview]
Message-ID: <4E43EC49.1040803@mit.edu> (raw)
In-Reply-To: <20110804064436.GA16247@gondor.apana.org.au>

On 08/04/2011 02:44 AM, Herbert Xu wrote:
> On Sun, Jul 24, 2011 at 07:53:14PM +0200, Mathias Krause wrote:
>>
>> With this algorithm I was able to increase the throughput of a single
>> IPsec link from 344 Mbit/s to 464 Mbit/s on a Core 2 Quad CPU using
>> the SSSE3 variant -- a speedup of +34.8%.
>
> Were you testing this on the transmit side or the receive side?
>
> As the IPsec receive code path usually runs in a softirq context,
> does this code have any effect there at all?
>
> This is pretty similar to the situation with the Intel AES code.
> Over there they solved it by using the asynchronous interface and
> deferring the processing to a work queue.

I have vague plans to clean up extended state handling and make 
kernel_fpu_begin work efficiently from any context.  (i.e. the first 
kernel_fpu_begin after a context switch could take up to ~60 ns on Sandy 
Bridge, but further calls to kernel_fpu_begin would be a single branch.)

The current code that handles context switches when user code is using 
extended state is terrible and will almost certainly become faster in 
the near future.

Hopefully I'll have patches for 3.2 or 3.3.

IOW, please don't introduce another thing like the fpu crypto module 
quite yet unless there's a good reason.  I'm looking forward to deleting 
the fpu module entirely.

--Andy

  parent reply	other threads:[~2011-08-11 14:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-24 17:53 [PATCH v2 0/2] crypto, x86: assembler implementation of SHA1 Mathias Krause
2011-07-24 17:53 ` [PATCH v2 1/2] crypto, sha1: export sha1_update for reuse Mathias Krause
2011-07-28 14:58   ` Herbert Xu
2011-07-28 15:29     ` Mathias Krause
2011-07-30 13:46       ` Herbert Xu
2011-07-31 13:24         ` Mathias Krause
2011-07-24 17:53 ` [PATCH v2 2/2] crypto, x86: SSSE3 based SHA1 implementation for x86-64 Mathias Krause
2011-08-04  6:44   ` Herbert Xu
2011-08-04 17:05     ` Mathias Krause
2011-08-04 17:08       ` Mathias Krause
2011-08-08  5:48       ` Locktyukhin, Maxim
2011-08-14 19:06         ` Mathias Krause
2011-08-11 14:50     ` Andy Lutomirski [this message]
2011-08-11 15:08       ` Herbert Xu
2011-08-11 15:15         ` Andrew Lutomirski
2011-08-14 19:09       ` Mathias Krause

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=4E43EC49.1040803@mit.edu \
    --to=luto@mit.edu \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxim.locktyukhin@intel.com \
    --cc=minipli@googlemail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox