From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Cata Vasile <cata.vasile@nxp.com>, Thomas Gleixner <tglx@linutronix.de>
Cc: Horia Geanta Neag <horia.geanta@nxp.com>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: Re: crypto: caam from tasklet to threadirq
Date: Tue, 20 Sep 2016 17:12:28 +0100 [thread overview]
Message-ID: <20160920161228.GQ1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <DB5PR04MB1302AD00536D2E37E726E104EEF30@DB5PR04MB1302.eurprd04.prod.outlook.com>
Okay, I've re-tested, using a different way of measuring, because using
openssl speed is impractical for off-loaded engines. I've decided to
use this way to measure the performance:
dd if=/dev/zero bs=1048576 count=128 | /usr/bin/time openssl dgst -md5
For the threaded IRQs case gives:
0.05user 2.74system 0:05.30elapsed 52%CPU (0avgtext+0avgdata 2400maxresident)k
0.06user 2.52system 0:05.18elapsed 49%CPU (0avgtext+0avgdata 2404maxresident)k
0.12user 2.60system 0:05.61elapsed 48%CPU (0avgtext+0avgdata 2460maxresident)k
=> 5.36s => 25.0MB/s
and the tasklet case:
0.08user 2.53system 0:04.83elapsed 54%CPU (0avgtext+0avgdata 2468maxresident)k
0.09user 2.47system 0:05.16elapsed 49%CPU (0avgtext+0avgdata 2368maxresident)k
0.10user 2.51system 0:04.87elapsed 53%CPU (0avgtext+0avgdata 2460maxresident)k
=> 4.95 => 27.1MB/s
which corresponds to an 8% slowdown for the threaded IRQ case. So,
tasklets are indeed faster than threaded IRQs.
I guess the reason is that tasklets are much simpler, being able to
run just before we return to userspace without involving scheduler
overheads, but that's speculation.
I've tried to perf it, but...
Samples: 31K of event 'cycles', Event count (approx.): 3552246846
Overhead Command Shared Object Symbol
+ 33.22% kworker/0:1 [kernel.vmlinux] [k] __do_softirq
+ 15.78% irq/311-2101000 [kernel.vmlinux] [k] __do_softirq
+ 7.49% irqbalance [kernel.vmlinux] [k] __do_softirq
+ 7.26% openssl [kernel.vmlinux] [k] __do_softirq
+ 5.71% ksoftirqd/0 [kernel.vmlinux] [k] __do_softirq
+ 3.64% kworker/0:2 [kernel.vmlinux] [k] __do_softirq
+ 3.52% swapper [kernel.vmlinux] [k] __do_softirq
+ 3.14% kworker/0:1 [kernel.vmlinux] [k] _raw_spin_unlock_irq
I was going to try to get the threaded IRQ case, but I've ended up with
perf getting buggered because of the iMX6 SMP perf disfunctionality:
[ 3448.810416] irq 24: nobody cared (try booting with the "irqpoll" option)
...
[ 3448.824528] Disabling IRQ #24
caused by FSL's utterly brain-dead idea of routing all the perf
interrupts to single non-CPU local interrupt input, and the refusal of
kernel folk to find an acceptable solution to support this.
So, sorry, I'm not going to bother trying to get any further with this.
If the job was not made harder stupid hardware design and kernel
politics, then I might be more inclined to do deeper investigation, but
right now I'm finding that I'm not interested in trying to jump through
these stupid hoops.
I think I've proven from the above that this patch needs to be reverted
due to the performance regression, and that there _is_ most definitely
a deterimental effect of switching from tasklets to threaded IRQs.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2016-09-20 16:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <DB5PR04MB130229BBD433C8FF7BDD975FEEF90@DB5PR04MB1302.eurprd04.prod.outlook.com>
2016-09-16 14:01 ` crypto: caam from tasklet to threadirq Cata Vasile
2016-09-16 16:53 ` Russell King - ARM Linux
2016-09-20 16:12 ` Russell King - ARM Linux [this message]
2016-09-20 20:10 ` Thomas Gleixner
2016-09-20 21:32 ` Russell King - ARM Linux
2016-09-20 23:31 ` Thomas Gleixner
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=20160920161228.GQ1041@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=cata.vasile@nxp.com \
--cc=horia.geanta@nxp.com \
--cc=linux-crypto@vger.kernel.org \
--cc=tglx@linutronix.de \
/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