Re: [PATCH 0/4] crypto: introduce generic dynamic software fallback and EIP93 support

Jihong Min <[email protected]>
Newsgroups org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi,

On 8/10/26 16:55, Herbert Xu wrote:
> On Tue, Jul 28, 2026 at 05:43:28PM +0900, Jihong Min wrote:
>>
>> The tcrypt AES-128-CBC results are median cycles from five runs. Lower
>> is better. Disabled uses cbc(aes-eip93) directly, while enabled uses
>> fallback(cbc(aes-eip93)).
>>
>>   Request   Disabled   Enabled   Cycle reduction
>>    (bytes)   (cycles)  (cycles)
>>        16        322        18             94.4%
>>        64        274        43             84.3%
>>       128        292        74             74.7%
>>       256        312       138             55.8%
>>      1024        434       439             -1.2%
>>      1424        492       488              0.8%
>>      4096        980      1023             -4.4%
> 
> Do these results vary that much at run-time that requires a run-time
> test? Surely you can predict the outcome for the platforms involved?>
> It appears to me that you're simply adding complexity for something
> that can already be easily tuned by the administrator through the
> algorithm priorities.

Many crypto IP including EIP93 can have different host CPU performance.
This idea is directly from in-kernel raid6 module to dynamically
calculate this host CPU performance to set the boundaries.

> 
> In fact, why not implement the benchmark in user-space and then based
> on that result adjust the priorities?

The same reason why there is the kernel crypto API. It is a single point
(both AF_ALG and devcrypto) of entrance to each crypto device
implementation. It is best to control within them.

> 
> Cheers,


Sincerely,
Jihong Min
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.