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 A47D2459D8 for ; Thu, 19 Sep 2024 20:33:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B8CE406FF; Thu, 19 Sep 2024 20:33:42 +0200 (CEST) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id D61DA4026B for ; Thu, 19 Sep 2024 20:33:40 +0200 (CEST) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-2d8fa2ca5b1so1040331a91.3 for ; Thu, 19 Sep 2024 11:33:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726770820; x=1727375620; 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=YLc09O0GI3Soy3gPDzmXCZGPa1xmIDLRqNrfOxBN7nQ=; b=iLB3peR8dGIyy7VYm8+030qTrBN811hTiOQivaNmvstiC7Pqtn2Ypw+PQFruGmL/EI QLbnDJeG0SdpWJW0gEPK590IiFrPQIAYx4Zluq9L7qX5vovkMETp+IzV0jFqCn7sGvp6 aUqQ1VHpbegZi9wZjwI8u7Xpu5ufTOE89mPG5E5APcp7kIG5B9nFgLsHYFxcFX8tXS6J SJpiVtY2PAQ/qpIO/AnNplY0pP3+d9fKKQqabpeAkdK6xUF4dVwppf90cpiFp8wlSK+u RmSP4w5YUZaQdGrIw3av34m69TlUBpjd7q8OIrqFCWriTOgG8bIjXFcOLleuDUG7zJbF SfGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726770820; x=1727375620; 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=YLc09O0GI3Soy3gPDzmXCZGPa1xmIDLRqNrfOxBN7nQ=; b=pcIgW8Q9PVgEKASgqV0ttYzhuxX06uJufXdJ55HcN4zXYdvH/lgIKawMc76inecm/O s9taeMqa30M4MWhAx6d8L5Tb/aMp5fCZDh7aRwvSyeyEH+Zbz/Jxr+36cIzX3exWbAoW NG6AFzI7ZBW5quaZZ/8/6aKsDyEWpYrqOPFOdWnKJDXWygBYHqFtg6aUAnkczvCiWfZY /Z8qI1jqxnobtXfAJbPy/FYeT385nAyznIh8x8qKlkM0FD135+88R8zkikfcnKRIsCdD 5HqYlNhEpVwGL2MkxV/umzOjBLiPmXNrCynOYXwFzZcinQwhigpy5GXfDX123a0GethX WzrA== X-Gm-Message-State: AOJu0YzzyMSua90g8unFVa2i+Fyxv7/W+22ZT/XKngPuK6PMC+DoJb5L raexM80aX+M0efTArQoLVC7h0+VQChn0AzIKSl1vSOyGTYqCKT72I6E6HkwwT5lR/RTAtT6WzqW DJDlpIF2j30fd3oAuUzEk4CnRnQpZekAQ X-Google-Smtp-Source: AGHT+IFlR4tSC2xvxccq4t+FSm27frLoaQmKHNYiJ2B/utw7gkhcRqpafcGc7BwS5IR4iLRXy3VQOX+gwBjJvADRnNI= X-Received: by 2002:a17:90b:4f83:b0:2d3:d7f4:8ace with SMTP id 98e67ed59e1d1-2dd7f3dcbd2mr405563a91.8.1726770819826; Thu, 19 Sep 2024 11:33:39 -0700 (PDT) MIME-Version: 1.0 References: <20240918162739.144ffd9d@hermes.local> In-Reply-To: From: Isaac Boukris Date: Thu, 19 Sep 2024 21:33:28 +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 Looking some more at the kernel code (tsc.c), it appears that it would only trust the arch frequency if the cpu 'tsc_known_freq' flag is set (which none of the machines I have access to has, although for some the dpdk's get_tsc_freq_arch() does return a value), otherwise it would calibrate it (hence the "Refined" in dmesg). Perhaps we should do the same. /* * When TSC frequency is known (retrieved via MSR or CPUID), we skip * the refined calibration and directly register it as a clocksource. */ if (boot_cpu_has(X86_FEATURE_TSC_KNOWN_FREQ)) {