From: Daniel Borkmann <dborkman@redhat.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-sctp@vger.kernel.org" <linux-sctp@vger.kernel.org>
Subject: Re: [PATCH net-next] loopback: sctp: add NETIF_F_SCTP_CSUM to device features
Date: Mon, 24 Feb 2014 13:02:27 +0100 [thread overview]
Message-ID: <530B34D3.2050307@redhat.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D0F6C9802@AcuExch.aculab.com>
On 02/24/2014 11:42 AM, David Laight wrote:
...
> I'm sure it shouldn't be that expensive, you are implying that it spent
> about 70% of the time doing crc32.
In this scenario, the following perf log I get that shows where cycles
are being spent on my machine:
65.95% netperf [kernel.kallsyms] [k] __crc32c_le
3.79% netperf [kernel.kallsyms] [k] memcpy
2.38% netperf [kernel.kallsyms] [k] copy_user_enhanced_fast_string
0.62% netperf [sctp] [k] sctp_datamsg_from_user
0.62% netperf [sctp] [k] sctp_sendmsg
0.55% netperf [kernel.kallsyms] [k] __slab_free
0.52% netperf [sctp] [k] sctp_outq_flush
0.50% netperf [kernel.kallsyms] [k] kfree
0.49% netperf [kernel.kallsyms] [k] cmpxchg_double_slab.isra.52
0.48% netperf [kernel.kallsyms] [k] kmem_cache_alloc
0.43% netperf [kernel.kallsyms] [k] __slab_alloc
0.42% netperf [kernel.kallsyms] [k] __copy_skb_header
0.41% netperf [kernel.kallsyms] [k] __alloc_skb
> The loop should be dominated by the per-byte lookup in a 256 word table.
> With 4k data the table will soon be in the data cache.
> Unless it is (stupidly) generating the table on each call, or trying
> to use a crc32 instruction, faulting, and emulating it, I wouldn't
> really have expected more than a few % improvement.
next prev parent reply other threads:[~2014-02-24 12:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-22 13:01 [PATCH net-next] loopback: sctp: add NETIF_F_SCTP_CSUM to device features Daniel Borkmann
2014-02-24 10:17 ` David Laight
2014-02-24 10:31 ` Daniel Borkmann
2014-02-24 10:42 ` David Laight
2014-02-24 12:02 ` Daniel Borkmann [this message]
2014-02-24 13:24 ` David Laight
2014-02-24 13:36 ` Daniel Borkmann
2014-02-24 14:07 ` David Laight
2014-02-24 14:06 ` Daniel Borkmann
2014-02-24 14:28 ` David Laight
2014-02-25 0:00 ` David Miller
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=530B34D3.2050307@redhat.com \
--to=dborkman@redhat.com \
--cc=David.Laight@ACULAB.COM \
--cc=davem@davemloft.net \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@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 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).