From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5CCE445980 for ; Thu, 19 Sep 2024 15:04:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 288F4406FF; Thu, 19 Sep 2024 15:04:48 +0200 (CEST) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id AB160402B1 for ; Thu, 19 Sep 2024 15:04:46 +0200 (CEST) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2d8fa2ca5b1so726174a91.3 for ; Thu, 19 Sep 2024 06:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726751086; x=1727355886; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vhiQjCfoS9kYZgVOWJWBVnHVWF6yiUI6uOIzx3eX4Lo=; b=eJ1xcbcB9D/UYM+Mz5SF8NGU1PBfW88NbIIEftOa2Kzjw6KpxD8vBd6PhaCoi1JEsz x4mpuHZGoHxO0+EYGaZVItrDL//K1oe+tWqTgmMcWuOXSc496hGElxxlPrrsIfQ+Ddgs Br5noV1sgAQzcOI8OL4y52azsqxUrMNJqEHrNQstCPFNzUsSd4jZIYHs1ZSUnqC5oHIV 9+7IEWKHRx+DB6hFitqSYsMZmDj6+bj0M+js69EYhGsa/kPePqgHl1asJAT5Zf2MYTq9 Kov4k9cfZyXOnnvNrhmn3GdS4ujP/bO9Huwmh0Cu1njdWjz6WMrYenSKAqxNvc81/YJA aN1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726751086; x=1727355886; 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=vhiQjCfoS9kYZgVOWJWBVnHVWF6yiUI6uOIzx3eX4Lo=; b=gfhp+ATXQQtXu4joNVWurrLb4JrT8ihUGcc2+T7as3q7l+m0mxwt2XFqZuLd1bc8vG r802Q0vpT2uE+9FvSLMsIQPKD1ZKb2E44NTGauOuKotPFZY0tzRZ+Rr5amGYCbRs1TKd mgGw0tiDqIBjHINtChpaI3qlA3cCmMpXD1XbLBtryguA7woaJrStocmXyvUn4GWITJav yAjnk9l24Itxin9xwEr9ZVRJ0VGtFrvCC/SORM7nZmjX8gAigw9UVt4EVLtm4dh8xOsM a74/VqTnBbaWtR3AkpQs58t++BPkehVd/jWhZ3GkBgjppopyg7pSuKqKW2B/sGqNu8Dl cqIQ== X-Gm-Message-State: AOJu0YznwrEECpmUml7lXb1QY3HN7rilOcZeqILAH4vv7o9uBQLMILt1 BC4hKVXS68TeS4Nlsj0NwVHTLPYqQXh5IPPVaag0b4+C87vJDyqb8+DajNbSglV/KQQ3YC/t9f0 9ZIgkTeQhHUcnP6CN87dlPH6DyJYFDJ2i X-Google-Smtp-Source: AGHT+IEgSfKnejrp9Zwqip0BcDZFOfsX5f3v5JgSuKiIXsVcn+nSCp5xr0ox6+MgOrGdoVpFYCcoE7Jw1ADmUC0zFlE= X-Received: by 2002:a17:90b:309:b0:2c9:81fd:4c27 with SMTP id 98e67ed59e1d1-2dbb9df8223mr30610584a91.14.1726751085832; Thu, 19 Sep 2024 06:04:45 -0700 (PDT) MIME-Version: 1.0 References: <20240918162739.144ffd9d@hermes.local> In-Reply-To: From: Isaac Boukris Date: Thu, 19 Sep 2024 16:04:34 +0300 Message-ID: Subject: Re: Accuracy of rte_get_tsc_hz() compared to linux To: Stephen Hemminger Cc: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On an older laptop (i7-8650U), running fedora with kernel 6.8.9-100.fc38.x86_64 journalctl -b | grep -i tsc Aug 29 12:34:00 localhost.localdomain kernel: tsc: Detected 2100.000 MHz processor Aug 29 12:34:00 localhost.localdomain kernel: tsc: Detected 2099.944 MHz TSC Aug 29 12:34:00 localhost.localdomain kernel: TSC deadline timer available Aug 29 12:34:00 localhost.localdomain kernel: clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x1e44fb6c2ab, max_idle_ns: 440795206594 ns Aug 29 12:34:00 localhost.localdomain kernel: clocksource: Switched to clocksource tsc-early Aug 29 12:34:00 localhost.localdomain kernel: tsc: Refined TSC clocksource calibration: 2112.000 MHz sudo bpftrace -e 'BEGIN { printf("%u\n", *kaddr("tsc_khz")); exit(); }' Attaching 1 probe... 2112000 dpdk logs before lowering the rounding: EAL: TSC frequency arch ~0 KHz EAL: TSC frequency linux ~2110000 KHz EAL: TSC frequency estimate ~2110000 KHz after lowering the rounding to 1KHz: EAL: TSC frequency arch ~0 KHz EAL: TSC frequency linux ~2112000 KHz EAL: TSC frequency estimate ~2112949 KHz