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 5D64B459D8 for ; Fri, 20 Sep 2024 00:21:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF6CE4026A; Fri, 20 Sep 2024 00:21:51 +0200 (CEST) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id EB4DB400EF for ; Fri, 20 Sep 2024 00:21:50 +0200 (CEST) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2068bee21d8so15336995ad.2 for ; Thu, 19 Sep 2024 15:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1726784510; x=1727389310; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=SQAa0xJgFSUfIDm+o3ljz+HHYXhQnATyi3BqXABA4Q0=; b=O+vo3bJAWJK+m+yPyGy8UU3rJ5C/jUitaT+YcMIyGFF0M452BCZbz2W0oZhXbGMShv pTaE/wv1VfaI6WzAx/h4JF6fBtnI8HxXoswdiRR9nJHvEiS+uxTQW67de7p88Fmof7eA eQbGUtJacWBNx/BP3UCTqO1JucYj3xFmsX3EYiylT7WLsS8PM0sGNogXTLvz9HWIFaW/ D4HJsaF9vfgBM4wccujFVjiY1g5pNYBaIQ/+2GQE02PaZAHcJ8opHr2zmOZ4p1wToL1H MXY2DSsqOjuxWOsUIaoYqFO562/4p/FzZYbCM3YFO6fmfIbm7VXz6TXaAFs1vdVU6J9C rwJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726784510; x=1727389310; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SQAa0xJgFSUfIDm+o3ljz+HHYXhQnATyi3BqXABA4Q0=; b=AkF7RtwkDXEwhvO4XQTNFscex06pUJcTZOBrhm+oqk9aTadiYUDEvubSIU3EHgUCDk bmjLF9kU5kcTLQBqzoCe0d5dIUmJua99lCDyxTgqmUtHaLLWc9/qbGEkpYaRVME4P74p pFH5pkEWpLsgINpjYGx/WItlyqxqPPTBvMw10HTfzactabt8YdGFmbdYXrpFyEi61GKL nFGEKsMz1RKqzynK5UXw5CuUQklL8ppIzRjd9Qk8hmpXkjneYpwT4tWKIq209wAkffzA kE8cZv+TquPzNB2AI3RIcSMVtXrX9KciKWM9cY6VJ6cKSob2DJk1YfrQ2dzBYWlsgkzL oznQ== X-Gm-Message-State: AOJu0Yz/zWrqmSOaIpppqXuYSRgyNMx2CjdeIPwRnvvdTUO9rGIbfpp5 IARXPFCxO1W37e0UR8Fw0svIUTPNV8WJNwOztkK14x1tuelLmw5u9pi1fEVPaIA= X-Google-Smtp-Source: AGHT+IE/Y68/BOznPTO3idu+r3iDimfXR7jY6o08yZWo7qyQXfElFtW7UjaoI2jPrVjxlDDWc0BB+Q== X-Received: by 2002:a17:903:32cb:b0:205:7db3:fdd1 with SMTP id d9443c01a7336-208d83e2f47mr9052445ad.36.1726784509980; Thu, 19 Sep 2024 15:21:49 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2079473586esm84340485ad.277.2024.09.19.15.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2024 15:21:49 -0700 (PDT) Date: Thu, 19 Sep 2024 15:21:48 -0700 From: Stephen Hemminger To: Isaac Boukris Cc: users@dpdk.org Subject: Re: Accuracy of rte_get_tsc_hz() compared to linux Message-ID: <20240919152148.45a19343@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Thu, 19 Sep 2024 01:04:40 +0300 Isaac Boukris wrote: > Hi, > > On Intel(R) Xeon(R) Gold 6130 CPU @ 2.10GHz (see lscpu output at the end). > > The rte_get_tsc_hz() returns 2100000 KHz but using it causes our > timestamps to lag behind real time (roughly a sec per 10 min). I > noticed the kernel uses 2095082 KHz and in fact it gives much better > results. > > dmesg: > tsc: Detected 2095.082 MHz processor > > tsc_freq_khz (custom kmod to exposes kernel's tsc_khz): > cat /sys/devices/system/cpu/cpu0/tsc_freq_khz > 2095082 Sigh. exposing tsc frequency through sysfs is a Redhat extension that never got merged upstream.