All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Theodore Ts'o" <tytso@mit.edu>, Pavel Machek <pavel@ucw.cz>,
	kernel list <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: Dhrystone -- userland version
Date: Mon, 9 Jan 2023 22:36:39 +0100	[thread overview]
Message-ID: <20230109213639.GA31782@1wt.eu> (raw)
In-Reply-To: <CAMuHMdX-xpu-+8kAun90ZdYLe6kMzW3CEoD_hQtpwTPSJ8Tp1A@mail.gmail.com> <CAMuHMdWm8Z-xkDUTjppbPT_uxFqfdOZPrPYxgBNgFRL6E=sN3w@mail.gmail.com>

Hi Geert,

On Mon, Jan 09, 2023 at 08:36:39PM +0100, Geert Uytterhoeven wrote:
> Seeing the rdtsc stuff, I was a bit skeptical, but it seems to work
> fine on arm32 and rv64.

Yes, I'm using it on arm32/64, mips, i386/x86_64, ppc64. It always
works fine. The rdtsc stuff you saw is not there to perform the
measurements, it's the opposite, the tool is measuring the TSC's
frequency when there is one :-)

> Unfortunately you forgot to add a LICENSE file ;-)

I really don't care. It can be public domain or MIT (since in many
places you can't drop your own rights and put something into public
domain). If you need anything from it, feel free to steal code from
it, I'm fine with this.

> Alternatively, I can use the C version of BogoMIPS.  Which has its
> own merits and reputation.

Yes, it's just that you have to apply your own ratios depending on
the build options and arch if you want to find the frequency.

> The nice thing about Dhrystones is that people still publish numbers
> for comparison, also DMIPS/MHz and DMIPS/mW.

Yes that's true, but the numbers can differ by orders of magnitude on
the same hardware depending on build options, it's hard to compare
anything using it these days.

> Gcc 4.1.2 (still the userspace compiler on a few of my old systems)
> doesn't like the aligned() attribute on functions.

Good to know, thank you. We could enclose it between ifdefs if needed.

> In glibc 2.3, LLONG_MAX is defined conditionally on __USE_ISOC99.

Yes or the usual (~0ULL)/2 should work and be equally portable.

> Apart from that, the result is fairly accurate. Nice job!

Actually it's not the tool that's accurate, it's gettimeofday() ;-)

Cheers,
Willy

  parent reply	other threads:[~2023-01-09 21:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07 22:30 Dhrystone -- userland version Pavel Machek
2023-01-08  5:16 ` Theodore Ts'o
2023-01-08  7:40   ` Pavel Machek
2023-01-08  9:58     ` Geert Uytterhoeven
2023-01-08 18:47       ` Pavel Machek
2023-01-09  0:45         ` Theodore Ts'o
2023-01-09  9:28           ` Geert Uytterhoeven
2023-01-09 14:30             ` Willy Tarreau
2023-01-09 19:36               ` Geert Uytterhoeven
2023-01-09 19:51                 ` Pavel Machek
2023-01-09 19:59                   ` Geert Uytterhoeven
2023-01-09 21:36                 ` Willy Tarreau [this message]
2023-01-09 19:57               ` Geert Uytterhoeven
2023-01-09 14:59           ` Pavel Machek
2023-01-11 13:32           ` Jan Engelhardt
2023-01-11 13:52             ` Geert Uytterhoeven
2023-01-11 15:30             ` Pavel Machek
2023-01-11 16:32               ` Jan Engelhardt

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=20230109213639.GA31782@1wt.eu \
    --to=w@1wt.eu \
    --cc=akpm@osdl.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.