All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
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 10:53:03 -0700	[thread overview]
Message-ID: <YV8z/9WVdq3gM8rw@gmail.com> (raw)
In-Reply-To: <20211007094224.owhdgujcln2zh2eg@linutronix.de>

On Thu, Oct 07, 2021 at 11:42:24AM +0200, Sebastian Andrzej Siewior wrote:
> On 2021-10-05 11:17:16 [-0700], Eric Biggers wrote:
> > Hi Sebastian,
> Hi,
> 
> > The comment above the definition of migrate_disable() in include/linux/preempt.h
> > claims that it is a temporary workaround.
> 
> It claims that, yes. I think this is due to the scheduler's limitation
> and should not encourage to use this over long sections.
> 
> > Is there a better way to do this that should be used instead?
> 
> 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.

- Eric

  reply	other threads:[~2021-10-07 17:53 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 [this message]
2021-10-07 19:03       ` Sebastian Andrzej Siewior
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=YV8z/9WVdq3gM8rw@gmail.com \
    --to=ebiggers@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --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.