LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Tianjia Zhang' <tianjia.zhang@linux.alibaba.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Vitaly Chikunov <vt@altlinux.org>,
	Eric Biggers <ebiggers@google.com>,
	"Eric Biggers" <ebiggers@kernel.org>,
	Gilad Ben-Yossef <gilad@benyossef.com>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	"Markku-Juhani O . Saarinen" <mjos@iki.fi>,
	Jussi Kivilinna <jussi.kivilinna@iki.fi>,
	Will Deacon <will@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jia Zhang <zhang.jia@linux.alibaba.com>,
	"YiLin . Li" <YiLin.Li@linux.alibaba.com>
Subject: RE: [PATCH 0/2] add AES-NI/AVX2/x86_64 implementation
Date: Fri, 20 Aug 2021 10:03:31 +0000	[thread overview]
Message-ID: <f7684dd9dc5e4c6081ba8e51f53e0844@AcuMS.aculab.com> (raw)
In-Reply-To: <20210818033117.91717-1-tianjia.zhang@linux.alibaba.com>

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)


  parent reply	other threads:[~2021-08-20 10:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18  3:31 Tianjia Zhang
2021-08-18  3:31 ` [PATCH 1/2] crypto: x86/sm4 - export reusable AESNI/AVX functions Tianjia Zhang
2021-08-18  3:31 ` [PATCH 2/2] crypto: x86/sm4 - add AES-NI/AVX2/x86_64 implementation Tianjia Zhang
2021-08-20 10:03 ` David Laight [this message]
2021-08-22  5:20   ` [PATCH 0/2] " Tianjia Zhang
2021-08-27  8:35 ` 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=f7684dd9dc5e4c6081ba8e51f53e0844@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=YiLin.Li@linux.alibaba.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=davem@davemloft.net \
    --cc=ebiggers@google.com \
    --cc=ebiggers@kernel.org \
    --cc=gilad@benyossef.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=hpa@zytor.com \
    --cc=jussi.kivilinna@iki.fi \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mjos@iki.fi \
    --cc=tglx@linutronix.de \
    --cc=tianjia.zhang@linux.alibaba.com \
    --cc=vt@altlinux.org \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=zhang.jia@linux.alibaba.com \
    --subject='RE: [PATCH 0/2] add AES-NI/AVX2/x86_64 implementation' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).