[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e5bac456-1760-48ff-9759-382ef7f3f392@gmx.de>
Date: Mon, 8 Jul 2024 12:28:33 +0200
From: Helge Deller <deller@....de>
To: Herbert Xu <herbert@...dor.apana.org.au>, 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 7/6/24 02:04, Herbert Xu wrote:
> 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.
Ok.
> What about adding a cpu_relax() in there if ktime_get doesn't
> advance? Something like
>
> while ((start = ktime_get()) == t0)
> cpu_relax();
Yes, looks better.
Will send updated patch.
Helge
Powered by blists - more mailing lists