From: Tim Chen <tim.c.chen@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"H. Peter Anvin" <hpa@zytor.com>,
"David S.Miller" <davem@davemloft.net>,
Ingo Molnar <mingo@kernel.org>,
Chandramouli Narayanan <mouli@linux.intel.com>,
Vinodh Gopal <vinodh.gopal@intel.com>,
James Guilford <james.guilford@intel.com>,
Wajdi Feghali <wajdi.k.feghali@intel.com>,
Jussi Kivilinna <jussi.kivilinna@iki.fi>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 6/7] sched: add function nr_running_cpu to expose number of tasks running on cpu
Date: Mon, 14 Jul 2014 12:08:28 -0700 [thread overview]
Message-ID: <1405364908.2970.729.camel@schen9-DESK> (raw)
In-Reply-To: <20140714181738.GI9918@twins.programming.kicks-ass.net>
On Mon, 2014-07-14 at 20:17 +0200, Peter Zijlstra wrote:
> On Mon, Jul 14, 2014 at 10:05:34AM -0700, Tim Chen wrote:
> > I was trying to explain why the algorithm is implemented this way
> > because of its batching nature.
> >
> > There is a whole class of async algorithm that can provide
> > substantial speedup by doing batch processing and uses workqueue.
> > The multi-buffer sha1 version has 2.2x speedup over existing
> > AVX2 version, and can have even more speedup when AVX3
> > comes round. Workqueue is a natural way to implement
> > this. I don't think a throughput speedup of 2.2x is "crap".
> >
> > We are not inventing anything new, but ask for a
> > very simple helper function to know if there's something else
> > running on our cpu to help us make a better decision
> > of whether we should flush the batched jobs immediately.
> >
> > And also asynchronous crypto interface is already used substantially
> > in crypto and has a well established infrastructure.
>
> The crap I was talking about is that there's a metric ton of 'async'
> interfaces all different.
Async interfaces when used appropriately, actually speed things up
substantially for crypto. We actually have a case with
ecyrptfs not using the async crypto interface, causing cpu to stall
and slowing things down substantially with AES-NI. And async interface
with workqueue speed things up (30% to 35% on encryption with SSD).
http://marc.info/?l=ecryptfs-users&m=136520541407248
http://www.spinics.net/lists/ecryptfs/msg00228.html
>
> Your multi-buffer thing isn't generic either, it seems lmiited to sha1.
We actually have many other multi-buffer crypto algorithms already
published for encryption and other IPSec usages. So
multi-buffer algorithm is not just limited to SHA1.
We hope to port those to the kernel crypto library eventually.
http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-multi-buffer-ipsec-implementations-ia-processors-paper.pdf
> It does not reuse padata,
padata tries to speed things up by parallelizing jobs to *multiple*
cpus. Whereas multi-buffer tries to speed things up by speeding things
up by using multiple data lanes in SIMD register in a *single* cpu.
These two usages are complementary but not the same.
> it does not extend workqueues,
Why do I need to extend workqueues if the existing ones already
meet my needs?
> it does not
> remove the btrfs nonsense,
Not much I can do about btrfs as I don't understand the issues there.
> it adds yet anotehr thing.
Thanks.
Tim
next prev parent reply other threads:[~2014-07-14 19:08 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1405074379.git.tim.c.chen@linux.intel.com>
2014-07-11 20:32 ` [PATCH v4 0/7] crypto: SHA1 multibuffer implementation Tim Chen
2014-07-11 20:32 ` [PATCH v4 1/7] crypto: SHA1 multibuffer crypto hash infrastructure Tim Chen
2014-07-11 20:32 ` [PATCH v4 2/7] crypto: SHA1 multibuffer algorithm data structures Tim Chen
2014-07-11 20:32 ` [PATCH v4 3/7] crypto: SHA1 multibuffer submit and flush routines for AVX2 Tim Chen
2014-07-11 20:32 ` [PATCH v4 4/7] crypto: SHA1 multibuffer crypto computation (x8 AVX2) Tim Chen
2014-07-11 20:33 ` [PATCH v4 5/7] crypto: SHA1 multibuffer scheduler Tim Chen
2014-07-11 20:33 ` [PATCH v4 6/7] sched: add function nr_running_cpu to expose number of tasks running on cpu Tim Chen
2014-07-12 9:25 ` Kirill Tkhai
2014-07-14 17:51 ` Tim Chen
2014-07-12 14:21 ` Tadeusz Struk
2014-07-14 23:51 ` Tim Chen
2014-07-14 10:16 ` Peter Zijlstra
2014-07-14 16:10 ` Tim Chen
2014-07-14 16:14 ` Peter Zijlstra
2014-07-14 17:05 ` Tim Chen
2014-07-14 18:17 ` Peter Zijlstra
2014-07-14 19:08 ` Tim Chen [this message]
2014-07-14 19:15 ` Peter Zijlstra
2014-07-14 19:50 ` Tim Chen
2014-07-15 9:50 ` Peter Zijlstra
2014-07-15 12:07 ` Peter Zijlstra
2014-07-15 12:59 ` Thomas Gleixner
2014-07-15 14:45 ` Mike Galbraith
2014-07-15 14:53 ` Peter Zijlstra
2014-07-15 18:06 ` Mike Galbraith
2014-07-15 19:03 ` Peter Zijlstra
2014-07-15 19:24 ` Mike Galbraith
2014-07-15 18:41 ` Tim Chen
2014-07-15 20:46 ` Thomas Gleixner
2014-07-15 18:40 ` Tim Chen
2014-07-15 18:40 ` Tim Chen
2014-07-15 13:36 ` Peter Zijlstra
2014-07-15 15:21 ` Tejun Heo
2014-07-15 16:37 ` Peter Zijlstra
2014-07-11 20:33 ` [PATCH v4 7/7] crypto: SHA1 multibuffer - flush the jobs early if cpu becomes idle Tim Chen
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=1405364908.2970.729.camel@schen9-DESK \
--to=tim.c.chen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=james.guilford@intel.com \
--cc=jussi.kivilinna@iki.fi \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mouli@linux.intel.com \
--cc=peterz@infradead.org \
--cc=vinodh.gopal@intel.com \
--cc=wajdi.k.feghali@intel.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