perfbook.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Elad Lahav <e2lahav@gmail.com>
Cc: perfbook@vger.kernel.org
Subject: Re: [PATCH 2/2] CodeSamples: Switch ARM64 get_timestamp() to use the hardware counter
Date: Tue, 16 Aug 2022 12:09:06 -0700	[thread overview]
Message-ID: <20220816190906.GF2125313@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <66962abc-94ce-b9ab-e75f-92d8bd03e8c9@gmail.com>

On Tue, Aug 16, 2022 at 08:48:54AM -0400, Elad Lahav wrote:
> On 2022-08-16 08:46, Elad Lahav wrote:
> > Signed-off-by: Elad Lahav <e2lahav@gmail.com>

Queued and pushed, thank you!

> I tested the change on an aarch64 board on both QNX and Linux. The Linux
> results show quite the change in performance from the clock_gettime()
> version, which is probably expected.
> 
> Before:
> root@localhost:~/src/CodeSamples/defer# ./gettimestamp
> d3f5e50a7d
> d3f5e50af5 120
> d3f5e50b6d 120
> d3f5e50be5 120
> d3f5e50c5d 120
> d3f5e50cd5 120
> d3f5e50d25 80
> d3f5e50d9d 120
> d3f5e50e15 120
> d3f5e50e8d 120
> 
> After:
> root@localhost:~/src/CodeSamples/defer# ./gettimestamp
> 73706dac1
> 73706dac2 1
> 73706dac4 2
> 73706dac5 1
> 73706dac6 1
> 73706dac8 2
> 73706dac9 1
> 73706dacb 2
> 73706dacc 1
> 73706dacd 1

I have to ask...  Are these the same units?  (I have in the past used
hardware where they would not be.)

Anyway, even if the hardware clock ticks an order of magnitude more
slowly, it is an impressive speedup.  ;-)

							Thanx, Paul

      reply	other threads:[~2022-08-16 19:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16 12:46 [PATCH 2/2] CodeSamples: Switch ARM64 get_timestamp() to use the hardware counter Elad Lahav
2022-08-16 12:48 ` Elad Lahav
2022-08-16 19:09   ` Paul E. McKenney [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=20220816190906.GF2125313@paulmck-ThinkPad-P17-Gen-1 \
    --to=paulmck@kernel.org \
    --cc=e2lahav@gmail.com \
    --cc=perfbook@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).