public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Noah Goldstein <goldstein.w.n@gmail.com>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Cc: Zack Weinberg <zack@owlfolio.org>,
	"Tang, Jun" <juntangc@amazon.com>,
	 GNU libc development <libc-alpha@sourceware.org>
Subject: Re: bug fix for hp-timing.h (aarch64)
Date: Mon, 16 Jan 2023 09:01:00 -0800	[thread overview]
Message-ID: <CAFUsyf+HtQyBE2G5HqVWvc45z1yo9fq0sb95qkFywAeHKwZ=5g@mail.gmail.com> (raw)
In-Reply-To: <PAWPR08MB89826F0C8C9738568F80A41583C19@PAWPR08MB8982.eurprd08.prod.outlook.com>

On Mon, Jan 16, 2023 at 8:34 AM Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
>
> Hi Noah,
>
> > If it's a long running benchmark (increased iteration count) then the
> > OS preemption
> > effect should scale up and the constant cost of the 2x function calls
> > / going to the
> > OS for getting the time should scale down proportionally.
> >
> > Maybe we just need two timer apis for `TIMING_NOW_LONG` and
> > `TIMING_NOW_SHORT`?
>
> Many benchtests run a fixed number of iterations on varying inputs (eg.
> string of size 1 vs 10000), so you wouldn't statically know which timer to use.
> Targets that have timer overflow issues (eg. Alpha) don't use it at all in the
> benchtests.

You could probably estimate with a static number of iterations but payloads
can be order of magnitude different i.e long strstr inputs vs short
memset.

How about then 3 APIs?

`TIMING_NOW` -> statically choose `TIMING_NOW_SHORT` vs `TIMING_NOW_LONG`
based on iter count, then explicit timers?

>
> Cheers,
> Wilco

  reply	other threads:[~2023-01-16 17:01 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
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 [this message]
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='CAFUsyf+HtQyBE2G5HqVWvc45z1yo9fq0sb95qkFywAeHKwZ=5g@mail.gmail.com' \
    --to=goldstein.w.n@gmail.com \
    --cc=Wilco.Dijkstra@arm.com \
    --cc=juntangc@amazon.com \
    --cc=libc-alpha@sourceware.org \
    --cc=zack@owlfolio.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).