[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MW5PR84MB1842F8D372B8EA06EC1349A9AB259@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM>
Date: Thu, 13 Oct 2022 22:52:09 +0000
From: "Elliott, Robert (Servers)" <elliott@....com>
To: Eric Biggers <ebiggers@...nel.org>
CC: "herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
"davem@...emloft.net" <davem@...emloft.net>,
"tim.c.chen@...ux.intel.com" <tim.c.chen@...ux.intel.com>,
"ap420073@...il.com" <ap420073@...il.com>,
"ardb@...nel.org" <ardb@...nel.org>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 08/19] crypto: x86/ghash - limit FPU preemption
> > + while (srclen >= GHASH_BLOCK_SIZE) {
> > + unsigned int fpulen = min(srclen, FPU_BYTES);
> > +
> > + kernel_fpu_begin();
> > + while (fpulen >= GHASH_BLOCK_SIZE) {
> > + int n = min_t(unsigned int, fpulen, GHASH_BLOCK_SIZE);
> > +
> > + clmul_ghash_update(dst, src, n, &ctx->shash);
> > +
> > + srclen -= n;
> > + fpulen -= n;
> > + src += n;
> > + }
> > + kernel_fpu_end();
> > + }
>
> Another loop that doesn't make sense. Why is this only passing 16 bytes at a
> time into the assembly code? There shouldn't be an inner loop here at all.
Thanks, copied the pattern from another function whose assembly function
had a size limit. clmul_ghash_update looks ready for all sizes, so I'll
simplify that.
Powered by blists - more mailing lists