Re: [PATCH] crypto: testmgr - Only disable migration in crypto_disable_simd_for_test()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux