From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A68DEC5479D for ; Mon, 9 Jan 2023 19:37:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237646AbjAIThJ (ORCPT ); Mon, 9 Jan 2023 14:37:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237545AbjAIThA (ORCPT ); Mon, 9 Jan 2023 14:37:00 -0500 Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A97377D3B for ; Mon, 9 Jan 2023 11:36:53 -0800 (PST) Received: by mail-qt1-f182.google.com with SMTP id fa5so3384075qtb.11 for ; Mon, 09 Jan 2023 11:36:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=S2V9u4/zHDvwynUvkUMGUF0Mb9Q6LsLWGa/rAa4/738=; b=DU07h7Ut9/z3T3eAl8VnSFgRQ4ZcW32LpEcx/TFFOFzd0/bxhPrrGT17SiqPhgEkTI FXdtWnz9hvAqMh2CJKTz57VNpU6fruooIuEnI4TjCom3RoQHSIvPMzET9Ub/OknQe2aZ MShUAwrWypvqJZGURl+4IoSIsCKuZeE8/eobBIw/0H+iSZMih7hG4WIT6KHepgZLmN0n sQeh6/cj8FKVfUV5rtawN2K0mTSoq3tO3g3v9C1hnxFHDJFbJhSfIzBMUthGmS2b2CQi 5NdzQZdRzMk6XuGAGe1Gtj9TaquhSpWUIzF0Kwt+Bt82FDhbhsGNBnla6sYjPXMkuQt6 kWLA== X-Gm-Message-State: AFqh2kpxVfXR3juEQzOyfqgWsyrCQpJb0FGhoVsWuEM/mlPbucEJyJcg AD+ZJYRn6tarJOXN+6Yitr/rUWQy1pj6tg== X-Google-Smtp-Source: AMrXdXtXDHPGg1eVSjkkoXV7t19mlKTGx7tMKtd21P3vzqHsdMRVk2KpoMnQewysdlgWv7Uyg9Q38A== X-Received: by 2002:ac8:720b:0:b0:3a8:5d1:aacb with SMTP id a11-20020ac8720b000000b003a805d1aacbmr89840822qtp.26.1673293012226; Mon, 09 Jan 2023 11:36:52 -0800 (PST) Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com. [209.85.219.178]) by smtp.gmail.com with ESMTPSA id m20-20020ac866d4000000b003a6a7a20575sm4977468qtp.73.2023.01.09.11.36.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Jan 2023 11:36:51 -0800 (PST) Received: by mail-yb1-f178.google.com with SMTP id 194so7300573ybf.8 for ; Mon, 09 Jan 2023 11:36:51 -0800 (PST) X-Received: by 2002:a25:5189:0:b0:7bf:d201:60cb with SMTP id f131-20020a255189000000b007bfd20160cbmr174031ybb.365.1673293011523; Mon, 09 Jan 2023 11:36:51 -0800 (PST) MIME-Version: 1.0 References: <20230109143059.GB25476@1wt.eu> In-Reply-To: <20230109143059.GB25476@1wt.eu> From: Geert Uytterhoeven Date: Mon, 9 Jan 2023 20:36:39 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Dhrystone -- userland version To: Willy Tarreau Cc: "Theodore Ts'o" , Pavel Machek , kernel list , Andrew Morton Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Willy, On Mon, Jan 9, 2023 at 3:31 PM Willy Tarreau wrote: > On Mon, Jan 09, 2023 at 10:28:09AM +0100, Geert Uytterhoeven wrote: > > On Mon, Jan 9, 2023 at 1:45 AM Theodore Ts'o wrote: > > > On Sun, Jan 08, 2023 at 07:47:07PM +0100, Pavel Machek wrote: > > > > > However, as this is not Linux-specific, how hard can it be to convince > > > > > your distro to include https://github.com/qris/dhrystone-deb.git? > > > > > Usually, when I have a full userspace available, I just clone the above, > > > > > and debuild it myself. > > > > > > > > Dunno. I'd not solve it if package was in Debian, but it is not. > > > > > > I would suspect the better long-term solution would be to get the > > > package into Debian, since that will be easier for people to use. I > > > suspect the reason why most distros don't include it is because it > > > really is a **terrible** benchmark for most use cases. > > > > My use case is verifying the CPU core clock rate when working on > > the clock driver and/or cpufreq. I can easily measure e.g. SPI or > > UART clock rates > > externally, but not CPU core clock rates. > > Then maybe you'd rather use this: > > https://github.com/wtarreau/mhz Thanks! > E.g.: > > $ ./mhz 10 > count=1666675 us50=20089 us250=100748 diff=80659 cpu_MHz=4132.645 tsc50=42427696 tsc250=212780620 diff=102 rdtsc_MHz=2112.014 > count=1666675 us50=20271 us250=101282 diff=81011 cpu_MHz=4114.688 tsc50=42813060 tsc250=213905908 diff=102 rdtsc_MHz=2111.970 > count=1666675 us50=20405 us250=100344 diff=79939 cpu_MHz=4169.867 tsc50=43094116 tsc250=211927426 diff=101 rdtsc_MHz=2112.027 > count=1666675 us50=20239 us250=100249 diff=80010 cpu_MHz=4166.167 tsc50=42744302 tsc250=211727114 diff=101 rdtsc_MHz=2112.021 > count=1666675 us50=20182 us250=100482 diff=80300 cpu_MHz=4151.121 tsc50=42624768 tsc250=212217884 diff=101 rdtsc_MHz=2111.994 > count=1666675 us50=20153 us250=100151 diff=79998 cpu_MHz=4166.792 tsc50=42562818 tsc250=211519326 diff=101 rdtsc_MHz=2112.009 > count=1666675 us50=20281 us250=99803 diff=79522 cpu_MHz=4191.733 tsc50=42832298 tsc250=210784252 diff=100 rdtsc_MHz=2112.019 > count=1666675 us50=20104 us250=99841 diff=79737 cpu_MHz=4180.431 tsc50=42461284 tsc250=210862414 diff=101 rdtsc_MHz=2111.957 > count=1666675 us50=20088 us250=100287 diff=80199 cpu_MHz=4156.349 tsc50=42423974 tsc250=211807066 diff=101 rdtsc_MHz=2112.035 > count=1666675 us50=20178 us250=99913 diff=79735 cpu_MHz=4180.536 tsc50=42614718 tsc250=211016124 diff=101 rdtsc_MHz=2112.014 > > It's also what's used by sbc-bench to verify that CPU vendors are not > cheating in the embedded world. It's very simple, and not arch-dependent > nor compiler-dependent (at least as long as you don't build at -O0 :-)). Seeing the rdtsc stuff, I was a bit skeptical, but it seems to work fine on arm32 and rv64. Unfortunately you forgot to add a LICENSE file ;-) Alternatively, I can use the C version of BogoMIPS. Which has its own merits and reputation. The nice thing about Dhrystones is that people still publish numbers for comparison, also DMIPS/MHz and DMIPS/mW. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds