[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZoiKD2A4pJhaEWpW@gondor.apana.org.au>
Date: Sat, 6 Jul 2024 10:04:31 +1000
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Helge Deller <deller@...nel.org>
Cc: linux-crypto@...r.kernel.org, Ard Biesheuvel <ardb@...nel.org>,
linux-parisc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: xor - fix template benchmarking
On Wed, Jun 19, 2024 at 07:31:57PM +0200, Helge Deller wrote:
>
> + t0 = ktime_get();
> + /* delay start until time has advanced */
> + do { start = ktime_get(); } while (start == t0);
Please rewrite this loop in the usual kernel coding style.
What about adding a cpu_relax() in there if ktime_get doesn't
advance? Something like
while ((start = ktime_get()) == t0)
cpu_relax();
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists