From: Steffen Klassert <steffen.klassert@secunet.com>
To: Daniel Jordan <daniel.m.jordan@oracle.com>
Cc: <peterz@infradead.org>, <akpm@linux-foundation.org>,
<linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: Question about padata's callback cpu
Date: Tue, 4 Jun 2019 08:45:30 +0200 [thread overview]
Message-ID: <20190604064530.GP17989@gauss3.secunet.de> (raw)
In-Reply-To: <20190528233707.gc4xomnlcuiszqht@ca-dmjordan1.us.oracle.com>
Hi Daniel,
On Tue, May 28, 2019 at 07:37:07PM -0400, Daniel Jordan wrote:
> Hi Steffen,
>
> I'm working on some padata patches and stumbled across this thread about the
> purpose of the callback CPU in padata_do_parallel.
>
> https://lore.kernel.org/lkml/20100402112326.GA19502@secunet.com/
Well, that's quite long ago :)
>
> The relevant part is,
>
> andrew> - Why would I want to specify which CPU the parallel completion
> andrew> callback is to be executed on?
>
> steffen> Well, for IPsec for example it is quite interesting to separate the
> steffen> different flows to different cpus. pcrypt does this by choosing different
> steffen> callback cpus for the requests belonging to different transforms.
> steffen> Others might want to see the object on the same cpu as it was before
> steffen> the parallel codepath.
>
> Not too familiar with IPsec, but I'm guessing it's interesting to separate the
> flows for performance reasons. Is the goal to keep multiple flows from
> interfering with each other (ensuring they run on different CPUs), or maybe to
> get better locality (ensuring each always runs on the same CPU)? It'd be
> helpful if you could expand on this.
Yes, separating flows is for performance reasons. In networking, the packet
order inside a flow is very important. If network packets get reordered,
performance will drop down. So packets of the same flow should always
stay on the same cpu, otherwise you can't ensure the packet order. But to
process the network packets as parallel as possible, you can move different
flows to different cpus by choosing a callback cpu for each flow.
> By the way, the padata patches extend the code to parallelize more places
> around the kernel, as Peter suggested.
That's great, go ahead!
prev parent reply other threads:[~2019-06-04 6:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 23:37 Question about padata's callback cpu Daniel Jordan
2019-06-04 6:45 ` Steffen Klassert [this message]
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=20190604064530.GP17989@gauss3.secunet.de \
--to=steffen.klassert@secunet.com \
--cc=akpm@linux-foundation.org \
--cc=daniel.m.jordan@oracle.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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).