Hi, On Sat, Jun 5, 2021 at 6:33 PM Ard Biesheuvel <ardb@xxxxxxxxxx> wrote: > > Hello Thara, > > On Fri, 4 Jun 2021 at 18:49, Thara Gopinath <thara.gopinath@xxxxxxxxxx> wrote: > > > > > > Hi All, > > > > Below are the performance numbers from running "crypsetup benchmark" on > > CE algorithms in the mainline kernel. All numbers are in MiB/s. The > > platform used is RB3 for sdm845 and MTPs for rest of them. > > > > > > SDM845 SM8150 SM8250 SM8350 > > AES-CBC (128) > > Encrypt / Decrypt 114/106 36/48 120/188 133/197 > > > > AES-XTS (256) > > Encrypt / Decrypt 100/102 49/48 186/187 n/a > > > > The CPU instruction based ones are apparently an order of magnitude > faster, and are synchronous so their latency should be lower. > > So, as Eric already pointed out IIRC, there doesn't seem to be much > value in enabling this IP in Linux - it should not be the default > choice/highest priority, and it is not obvious to me whether/when you > would prefer this implementation over the CPU based one. Do you have > any idea how many queues it has, or how much data it can process in > parallel? Are there other features that stand out? One of the things to consider with separate hardware block implementation vis a vis CPU instruction based ones in general is that often the consideration is more about getting a good enough performance while freeing the CPU to perform other tasks which results in better overall system performance rather than getting the best possible performance in the specific task at hand. This is sometimes further extended with power considerations where you can get better power consumption when the lower performance engine is used. Less often, a lower jitter is more important than the peak performance. I've seen this with encrypted video decoding for example. Sadly, whether any of these considerations is applicable is very much system and work load specific. So my 2c contribution would be to include support for this, even if not make this the default. Gilad -- Gilad Ben-Yossef Chief Coffee Drinker values of β will give rise to dom!