From: "Zack Weinberg" <zack@owlfolio.org>
To: "Wilco Dijkstra" <Wilco.Dijkstra@arm.com>,
"Tang, Jun" <juntangc@amazon.com>
Cc: "GNU libc development" <libc-alpha@sourceware.org>
Subject: Re: bug fix for hp-timing.h (aarch64)
Date: Thu, 12 Jan 2023 13:54:06 -0500 [thread overview]
Message-ID: <31276f46-5376-4c2c-85c7-ffa08e9a771d@app.fastmail.com> (raw)
In-Reply-To: <PAWPR08MB89827F5DF4148282647889AC83FD9@PAWPR08MB8982.eurprd08.prod.outlook.com>
On Thu, Jan 12, 2023, at 1:07 PM, Wilco Dijkstra wrote:
> Hi Zack,
>
>> I'm surprised to hear you say that. To me, 16 seconds is an absurdly _long_
>> interval for use of hp-timing.h. For anything longer than a few tens of
>> milliseconds, the overhead of two system calls is negligible, but both CPU
>> frequency changes and getting descheduled in the middle of the
>> measurement become serious concerns. So it seems more appropriate to
>> me to use clock_gettime with a per-process or per-thread clock ID for
>> measurements on the scale of tens of seconds.
>
> On AArch64 the counter is absolutely solid - it's fixed frequency and system
> wide monotonically increasing. So there are no issues with varying clock
> frequency or rescheduling to a different core, you get elapsed time at
> nanosecond accuracy.
... but that's not what you _want_ for a benchmark! You don't want the time to tick up while the benchmark process is preempted (not executing on _any_ core), for instance. Or am I misunderstanding what this is used for?
zw
next prev parent reply other threads:[~2023-01-12 18:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 22:49 Wilco Dijkstra
2023-01-12 14:38 ` Tang, Jun
2023-01-12 18:07 ` Wilco Dijkstra
2023-01-12 18:54 ` Zack Weinberg [this message]
2023-01-12 20:32 ` Wilco Dijkstra
2023-01-12 20:51 ` Noah Goldstein
2023-01-16 16:33 ` Wilco Dijkstra
2023-01-16 17:01 ` Noah Goldstein
2023-01-16 18:35 ` Wilco Dijkstra
2023-01-12 15:11 ` Zack Weinberg
-- strict thread matches above, loose matches on Subject: below --
2023-01-11 16:44 Tang, Jun
2023-01-11 17:22 ` Zack Weinberg
2023-01-31 14:47 ` Tang, Jun
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=31276f46-5376-4c2c-85c7-ffa08e9a771d@app.fastmail.com \
--to=zack@owlfolio.org \
--cc=Wilco.Dijkstra@arm.com \
--cc=juntangc@amazon.com \
--cc=libc-alpha@sourceware.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).