From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id 821253858D33 for ; Mon, 16 Jan 2023 17:01:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 821253858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x636.google.com with SMTP id u19so69452926ejm.8 for ; Mon, 16 Jan 2023 09:01:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=uGQxt8EuMl9V66ro346rcF2ILgrg9qMLIDW/6WAWPfk=; b=LFe3DgS/UHTgvpIyG3/ggiLwyX+hSP2yf8XSIVo3wdMJDDRuO4taS6ttRa6mvfoD8j zMYZlIBz/62tuXOZn6GVMVE/f5i2+xE5MB/ubHd6pH8XbggZcXg7CznEY6aG4XsUx3go KxR4nGVL5b2AtLi2xntMuiwlQMuFCn/gjdCViY0RefQY5YSU1kW6Saz/CNfT4vKkCe0G N4dQcQuewALy8G1BlDFZwnTFZR4VasqNZ0DzRpHytMEZxP1Q6igfStoTFrE5AybO6dTx 2BjFYD5wCnBgnHPQZoCNOKuWGrrxS6FKp53QoNCQ3I65Q1tKxlI1T5twSzxkx81CekXI 49fQ== 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=uGQxt8EuMl9V66ro346rcF2ILgrg9qMLIDW/6WAWPfk=; b=f8cFNW+OmQLjKgatAm6f2zMjNY0VGKvuBBPSHeMAG5WMiuZs2b1wrrXmWc+vmRmkQu WhQW2OWS478Keg5yfUA7ymnKdpmJfFGLvrErH4SuQXKVqHHHiWL5IuGddpN9WrxX/mEF HRn3Zrc22UGgzAFm/C82vOBOWw8e/DyXYly7ay3wcEDXblSvJPeD2licZAppE+vgB3Rz ZzYfJydwSB3eXagW15NgbdeQ2+vSjQw59eumBDkJ6RfuYbg+6BkPZfvhc7o9mKb80BKT rt9Iy4ElSTsVuEBTOvOlcpfgPXXnaIZyq/UC23mqMsKJZZ47TUc9kJ1Md1Rla8YFeOuo Brcw== X-Gm-Message-State: AFqh2kqrOvRf4DRT2AE0Bf53qXLGLRjNAvTQImTNu5MWbh2e6s2nt3lf JjG9ehgrc3Avd68R4U7x9c0wqKTYHIG13Bmmp/U= X-Google-Smtp-Source: AMrXdXsHAhVd5+heFrAmh5e/o5bSAxNdeXRoFCyM5IA3GjxN3Son+I1wabO7SKXHDH5DaLM1Y6Lo2Akvyiun+AsSfmw= X-Received: by 2002:a17:906:281b:b0:7c1:98f:be57 with SMTP id r27-20020a170906281b00b007c1098fbe57mr5227120ejc.97.1673888472285; Mon, 16 Jan 2023 09:01:12 -0800 (PST) MIME-Version: 1.0 References: <31276f46-5376-4c2c-85c7-ffa08e9a771d@app.fastmail.com> In-Reply-To: From: Noah Goldstein Date: Mon, 16 Jan 2023 09:01:00 -0800 Message-ID: Subject: Re: bug fix for hp-timing.h (aarch64) To: Wilco Dijkstra Cc: Zack Weinberg , "Tang, Jun" , GNU libc development Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Jan 16, 2023 at 8:34 AM Wilco Dijkstra 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