linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: Haren Myneni <haren@linux.vnet.ibm.com>,
	Dan Streetman <ddstreet@ieee.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	Ram Pai <linuxram@us.ibm.com>,
	npiggin@gmail.com, suka@us.ibm.com,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH V3 6/6] crypto/nx: Add P9 NX support for 842 compression engine
Date: Sat, 02 Sep 2017 23:42:36 +1000	[thread overview]
Message-ID: <1504359756.4728.7.camel@neuling.org> (raw)
In-Reply-To: <59AA6E71.8070704@linux.vnet.ibm.com>


> > > +static int nx842_powernv_crypto_init_vas(struct crypto_tfm *tfm)
> > > +{
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct nx842_crypto_ctx *c=
tx =3D crypto_tfm_ctx(tfm);
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct nx842_workmem *wmem=
;
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct nx842_coproc *copro=
c;
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0int ret;
> > > +
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ret =3D nx842_crypto_init(=
tfm, &nx842_powernv_driver);
> > > +
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (ret)
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0return ret;
> > > +
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0wmem =3D PTR_ALIGN((struct=
 nx842_workmem *)ctx->wmem,
> > > WORKMEM_ALIGN);
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0coproc =3D per_cpu(coproc_=
inst, smp_processor_id());
> >=20
> > this is wrong.=C2=A0=C2=A0the crypto transform init function is not gua=
ranteed
> > to be called by the same processor that later uses it.=C2=A0=C2=A0Just =
because
> > that happens to be how zswap operates doesn't guarantee other crypto
> > users will do the same.
>=20
> Dan, Sorry missed this comment.=C2=A0
>=20
> Right, The actual crypto request can be executed on other processor than =
the
> CPU when the init is executed. The main goal is open send window on the N=
X
> engine which is on the same chip for the corresponding CPU. So we are OK =
if
> the request is scheduled on other CPU as long as it belongs to same chip.
> Otherwise in the worst case we will end up using remote NX.=C2=A0=C2=A0

You want the NX to be close to the requester CPU, but probably more importa=
ntly
you want the NX close to the memory it's going to be operating on.=C2=A0

Preferably they would all be on the same node.

Mikey=20

  reply	other threads:[~2017-09-02 13:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-22  5:01 [PATCH V3 6/6] crypto/nx: Add P9 NX support for 842 compression engine Haren Myneni
2017-07-24 16:46 ` Ram Pai
2017-08-28 23:25 ` Michael Ellerman
2017-08-29 13:32   ` Dan Streetman
2017-08-31  7:44     ` Haren Myneni
2017-08-31 13:40       ` Dan Streetman
2017-08-31 19:03         ` Haren Myneni
2017-09-01 11:34       ` Michael Ellerman
2017-09-02  4:11         ` Haren Myneni
2017-08-29  6:30 ` Sukadev Bhattiprolu
2017-08-29 13:58 ` Dan Streetman
2017-08-29 21:23   ` Benjamin Herrenschmidt
2017-08-29 21:54     ` Haren Myneni
2017-08-29 21:57       ` Benjamin Herrenschmidt
2017-08-30  1:02         ` Haren Myneni
2017-08-31 13:31       ` Dan Streetman
2017-08-31 19:09         ` Haren Myneni
2017-09-01 11:29         ` Michael Ellerman
2017-09-02  3:27           ` Haren Myneni
2017-09-02 16:14           ` Dan Streetman
2017-09-02  8:40   ` Haren Myneni
2017-09-02 13:42     ` Michael Neuling [this message]
2017-09-02 16:17     ` Dan Streetman
2017-09-03  8:32       ` Haren Myneni
2017-09-03 14:12         ` Dan Streetman

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=1504359756.4728.7.camel@neuling.org \
    --to=mikey@neuling.org \
    --cc=ddstreet@ieee.org \
    --cc=haren@linux.vnet.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=linuxram@us.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=suka@us.ibm.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;
as well as URLs for NNTP newsgroup(s).