lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 22 Aug 2021 13:20:06 +0800
From:   Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
To:     David Laight <David.Laight@...LAB.COM>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Vitaly Chikunov <vt@...linux.org>,
        Eric Biggers <ebiggers@...gle.com>,
        Eric Biggers <ebiggers@...nel.org>,
        Gilad Ben-Yossef <gilad@...yossef.com>,
        Ard Biesheuvel <ardb@...nel.org>,
        "Markku-Juhani O . Saarinen" <mjos@....fi>,
        Jussi Kivilinna <jussi.kivilinna@....fi>,
        Will Deacon <will@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Jia Zhang <zhang.jia@...ux.alibaba.com>,
        "YiLin . Li" <YiLin.Li@...ux.alibaba.com>
Subject: Re: [PATCH 0/2] add AES-NI/AVX2/x86_64 implementation

Hi David,

On 8/20/21 6:03 PM, David Laight wrote:
> From: Tianjia Zhang
>> Sent: 18 August 2021 04:31
>>
>> This patchsets exported some of the common functions implemented by
>> the SM4 AESNI/AVX algorithm, and reused these functions to achieve
>> the acceleration of AESNI/AVX2 implementation.
> 
> These functions need bracketing by kernel_fpu_enable()
> (or whatever it is called.)
> That will significantly affect the performance.
> 
> Also the functions look pretty big (I don't know how big
> the generic ones are) and will take time to load into the I$
> and will displace other code.
> 
> So while a hot-cache benchmark might show improvements
> for repeated calls is isn't obvious that any significant
> gain will be made for real-life calls which could easily
> be of single buffers.
> 
> 	David
> 
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
> 

Yes, the functions bracketed by kernel_fpu_begin() do affect 
performance. It seems that the kernel can only do this, so by processing 
as much data as possible in a kernel_fpu_begin/end() operation to 
improve performance. actually do it now.

Best regards,
Tianjia

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ