All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Eric Biggers <ebiggers@kernel.org>
Cc: linux-crypto@vger.kernel.org,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] crypto: testmgr - Only disable migration in crypto_disable_simd_for_test()
Date: Thu, 7 Oct 2021 21:03:32 +0200	[thread overview]
Message-ID: <20211007190332.3gijssg4lbwfxv6j@linutronix.de> (raw)
In-Reply-To: <YV8z/9WVdq3gM8rw@gmail.com>

On 2021-10-07 10:53:03 [-0700], Eric Biggers wrote:
> On Thu, Oct 07, 2021 at 11:42:24AM +0200, Sebastian Andrzej Siewior wrote:
> > An alternative might be to move the whole test into a kworker which is
> > bound to a specific CPU. So even without disabling preemption/ migration
> > the per-CPU pointer would remain stable.
> > 
> 
> It's only individual test cases that need to use the SIMD disabled flag, not the
> whole test.  An algorithm test could involve 100 test cases, any subset of which
> use the SIMD disabled flag and the others don't.  So the assumption is that this
> can be a relatively fine-grained knob.  Executing different individual test
> cases on different threads sounds painful.  Your simple change to use
> migrate_disable() looks much better, but I'm not sure how to reconcile that with
> the claim that migrate_disable() is a temporary workaround.

Now that you bring it up, I was under the impression that the
"SIMD-disabled" flag is only changed by the tcrypt module not by the
individual tests which are performed at the algorithm lookup time. If it
is the latter than yes, it will be painful. If it is just tcrypt then
you could wrap the whole test-suite (at module init's time) into the
kworker and bind it to one CPU).

Maybe Peter can bring light into the temporary workaround but it does
look like simplest thing here.

> - Eric

Sebastian

  reply	other threads:[~2021-10-07 19:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 11:54 [PATCH] crypto: testmgr - Only disable migration in crypto_disable_simd_for_test() Sebastian Andrzej Siewior
2021-10-05 18:17 ` Eric Biggers
2021-10-07  9:42   ` Sebastian Andrzej Siewior
2021-10-07 17:53     ` Eric Biggers
2021-10-07 19:03       ` Sebastian Andrzej Siewior [this message]
2021-10-08 11:34         ` Herbert Xu
2021-10-08 12:24 ` Herbert Xu

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=20211007190332.3gijssg4lbwfxv6j@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.