linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sven Auhagen <sven.auhagen@voleatech.de>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "Van Leeuwen, Pascal" <pvanleeuwen@rambus.com>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH 1/1] inside-secure irq balance
Date: Fri, 17 Jul 2020 07:01:34 +0200	[thread overview]
Message-ID: <20200717050134.dk5naairvhmyyxyu@SvensMacBookAir.sven.lan> (raw)
In-Reply-To: <20200716120420.GA31780@gondor.apana.org.au>

On Thu, Jul 16, 2020 at 10:04:20PM +1000, Herbert Xu wrote:
> On Thu, Jul 16, 2020 at 11:21:36AM +0200, Sven Auhagen wrote:
> >
> > You are correct, let me have a look at how to get the cpu bit correctly.
> > Well everything runs on the first CPU now, what do you do if that does down or up?
> > I think there is no mechanism in general at the moment for the current or my implementation.
> 
> Unless the driver changed it the default affinity should be all
> CPUs, no? In which case if the first CPU goes down it'll just move
> to the second CPU.

Alright, that makes sense, thank you.

As I said in my second email yesterday, it is just a hint and not binding.
I run some tests and here is what happens when I disable CPU3 on my 4 Core MCBin:

[641628.819934] crypto-safexcel f2800000.crypto: EIP197:241(0,1,4,4)-HIA:230(2,6,6),PE:133/332,alg:7ffdf000
[641628.823954] crypto-safexcel f2800000.crypto: TRC init: 15360d,80a (48r,256h)
[641628.825326] crypto-safexcel f2800000.crypto: firmware: direct-loading firmware inside-secure/eip197b/ifpp.bin
[641628.825693] crypto-safexcel f2800000.crypto: firmware: direct-loading firmware inside-secure/eip197b/ipue.bin
[641629.033302] alg: No test for authenc(hmac(sha224),cbc(aes)) (safexcel-authenc-hmac-sha224-cbc-aes)
[641629.044442] alg: No test for authenc(hmac(sha384),cbc(aes)) (safexcel-authenc-hmac-sha384-cbc-aes)
[641629.057356] alg: No test for authenc(hmac(sha224),rfc3686(ctr(aes))) (safexcel-authenc-hmac-sha224-ctr-aes)
[641698.795895] IRQ 38: no longer affine to CPU3
[641698.795917] IRQ 54: no longer affine to CPU3
[641698.795928] IRQ 59: no longer affine to CPU3
[641698.795942] IRQ69: set affinity failed(-22).
[641698.795950] IRQ70: set affinity failed(-22).
[641698.795959] IRQ73: set affinity failed(-22).
[641698.795969] IRQ 77: no longer affine to CPU3
[641698.796131] CPU3: shutdown
[641698.796156] psci: CPU3 killed (polled 0 ms)

74:       1363          0          0   ICU-NSR  88 Level     f2800000.crypto
75:          0       1772          0   ICU-NSR  89 Level     f2800000.crypto
76:          0          0       1427   ICU-NSR  90 Level     f2800000.crypto
77:          0          0          0   ICU-NSR  91 Level     f2800000.crypto

IRQ 77 was bound to CPU3 via the hint is no longer affine now
and actually bound to CPU0.

When I disable CPU1 and CPU3 and load the module I get:

74:       4089          0   ICU-NSR  88 Level     f2800000.crypto
75:       1772          0   ICU-NSR  89 Level     f2800000.crypto
76:       1427       2854   ICU-NSR  90 Level     f2800000.crypto
77:       2824          0   ICU-NSR  91 Level     f2800000.crypto

where you can see that the affinity hint is ignored for CPU1
which is selected because of number of cpus online is 2 now.

Does that answer your question?

Best
Sven
> 
> Cheers,
> -- 
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: https://eur03.safelinks.protection.outlook.com/?url=http:%2F%2Fgondor.apana.org.au%2F~herbert%2F&amp;data=02%7C01%7Csven.auhagen%40voleatech.de%7C0790b23c7a61493c8bfe08d82980621d%7Cb82a99f679814a7295344d35298f847b%7C0%7C1%7C637304978692090806&amp;sdata=QZUqtMuwN8vOxUK1tjFiENuwPD6gIxHpTvntLdbqTqg%3D&amp;reserved=0
> PGP Key: https://eur03.safelinks.protection.outlook.com/?url=http:%2F%2Fgondor.apana.org.au%2F~herbert%2Fpubkey.txt&amp;data=02%7C01%7Csven.auhagen%40voleatech.de%7C0790b23c7a61493c8bfe08d82980621d%7Cb82a99f679814a7295344d35298f847b%7C0%7C1%7C637304978692090806&amp;sdata=Z3GYc1YWWeenCLYZUKXxzwWDQnrmvEuBHStIcPFcOp0%3D&amp;reserved=0

  reply	other threads:[~2020-07-17  5:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08 15:08 [PATCH 1/1] inside-secure irq balance Sven Auhagen
2020-07-16  7:21 ` Herbert Xu
2020-07-16  8:44   ` Van Leeuwen, Pascal
2020-07-16  9:21     ` Sven Auhagen
2020-07-16 12:04       ` Herbert Xu
2020-07-17  5:01         ` Sven Auhagen [this message]
2020-07-17  5:20           ` Herbert Xu
2020-07-17  6:35             ` Sven Auhagen
2020-07-17  6:57               ` Herbert Xu
2020-07-17  7:53                 ` Sven Auhagen
2020-07-17  8:56                   ` Van Leeuwen, Pascal
2020-07-17 13:50                   ` Herbert Xu
2020-07-16 10:31     ` Sven Auhagen

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=20200717050134.dk5naairvhmyyxyu@SvensMacBookAir.sven.lan \
    --to=sven.auhagen@voleatech.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=pvanleeuwen@rambus.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).