netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bert hubert <ahu@ds9a.nl>
To: Shekhar Kshirsagar <shekhark@juniper.net>
Cc: Networking Team <netdev@oss.sgi.com>, jmorris@redhat.com
Subject: ipsec null encryption slower than AES / was Re: 2.6 IPSec Throughput puzzle
Date: Sat, 1 Jan 2005 22:03:47 +0100	[thread overview]
Message-ID: <20050101210347.GA4713@outpost.ds9a.nl> (raw)
In-Reply-To: <EF311E6F9B0B0848A49ED20B06E9CB27031FDE7A@gluon.jnpr.net>

[added James Morris, resident crypto api guru, to the CC list] 

On Wed, Dec 29, 2004 at 03:50:34PM -0800, Shekhar Kshirsagar wrote:
> I played with oprofile for a while, and it seems that in case of null
> encryption, scatterwalk related code takes most of the cpu cycles.

Odd - the 'scatterlist' is what people were most proud of in the ipsec work
in 2.6. I recall that it was implemented as a natural way to represent the
encryption needs of ipsec. 

>From your numbers below it is clear all ipsec benchmarks have maxed out your
CPU, but aes/sha1 still has some hits in default_idle. Is this an SMP
system?

scatterwalk_done consists of crypto_kunmap, which in turn calls
kunmap_atomic (inline), which is defined as nothing sometimes and as a real
function otherwise which is not likely to be inlined, so should show up in
the profile if it were a large load.

The other part of scatterwalk_done is scatterwalk_page_done, which looks
like it could cause further (inlined) work.

But, in the end, I can't really help you further. All this scatterlist stuff
looks like something is really badly tuned for null-encryption and
well-tuned for encryption.

> Is there any place where I can find documentation about what exactly
> scatterwalk does?

http://www.certconf.org/presentations/2004/Tuesday/TS2.pdf - the concept is
called 'the scatterlist'.

http://lwn.net/Articles/14010/?format=printable is also nice.

Good luck!

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO

  reply	other threads:[~2005-01-01 21:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-29 23:50 2.6 IPSec Throughput puzzle Shekhar Kshirsagar
2005-01-01 21:03 ` bert hubert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-01-02  6:51 ipsec null encryption slower than AES / was " Shekhar Kshirsagar

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=20050101210347.GA4713@outpost.ds9a.nl \
    --to=ahu@ds9a.nl \
    --cc=jmorris@redhat.com \
    --cc=netdev@oss.sgi.com \
    --cc=shekhark@juniper.net \
    /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;
as well as URLs for NNTP newsgroup(s).