mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	Helge Deller <deller@kernel.org>
Cc: linux-crypto@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
	linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: xor - fix template benchmarking
Date: Mon, 8 Jul 2024 12:28:33 +0200	[thread overview]
Message-ID: <e5bac456-1760-48ff-9759-382ef7f3f392@gmx.de> (raw)
In-Reply-To: <ZoiKD2A4pJhaEWpW@gondor.apana.org.au>

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

      reply	other threads:[~2024-07-08 10:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 17:31 Helge Deller
2024-06-20 12:34 ` John David Anglin
2024-06-28  1:03 ` Herbert Xu
2024-07-06  0:04 ` Herbert Xu
2024-07-08 10:28   ` Helge Deller [this message]

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=e5bac456-1760-48ff-9759-382ef7f3f392@gmx.de \
    --to=deller@gmx.de \
    --cc=ardb@kernel.org \
    --cc=deller@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®