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 DFC0D459D8 for ; Fri, 20 Sep 2024 00:02:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A27F642F93; Fri, 20 Sep 2024 00:02:42 +0200 (CEST) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id DA7194029D for ; Fri, 20 Sep 2024 00:02:40 +0200 (CEST) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-20696938f86so12036645ad.3 for ; Thu, 19 Sep 2024 15:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1726783360; x=1727388160; 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=P+xFZ3PpkRFaznYE9mawImU9fZ4xF/EYJnJGjfphruU=; b=KzDkrNRCkD9LpGVQ20Tz6Rmoe9zWdCKsEvFxB/6nhJZCqS/ANbwJEEx6YuYZKm/ESZ eOgw9l9dRMkHDU91yNs5eW7R6ej96JiytpkZkLL3OiqXt3Qi3PgQ2+gWB8gKutSDlqLY pwDdwrK/ILfeo0SW8g25IwypjJtZW1C8wOV+1rFetf2SvTTGQy9UQpXRLJxrLMyavb41 u4poR1kx8rrxgfXDaXiG2m2FnfofxUzMpcIt0t1Stzm6BmVnz50XRpIv3pqpYQ56MN0j D/hpxUy2UlRH7BB8VpDfL4zfAQPJ33s0e5ZEa3uxOf/DTb77T6TLtl/q9yU8QEXU5aag foew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726783360; x=1727388160; 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=P+xFZ3PpkRFaznYE9mawImU9fZ4xF/EYJnJGjfphruU=; b=Ho/eHdkVQF1iTv2yzNujHnu3ZVXr3YvA4gMnbaYYkc3FzBDLHP8UuTFS82qTm1RhDk h5noudbrhaF5zDI+/a9tJ+ELaICin9Bf8I5/ndrbggZVxC8ZzRjq7L9AoMoRB/eDM9lQ 9Czsk7Znxqc9T9y2iZ8Ejo7GuRhNWgsxqExHNGvQYGdPQ0M+rsDq9uhDxXZ2TWeQQto+ 3IzY0iZHUHvT13v9/kjZXTIlgUlEiKvsZcHDES6vx9orZCbF9WcTi14FG3e3k/5+b1cn dNnKf4HajHHU3CIKf6PddkE9G6AzWvYhQ3/ro3QhUBCY9uRkHj7QBcZWaAq5ybEDvgTf 3wSw== X-Gm-Message-State: AOJu0Yxkof1VRb1E10Wjbmf5LY/m55d/TCHCh9cbKNr0co6UuzslyX/w 76QuneH4xs1RAkg0N9dPYf5CKxAoJQcXL9H2krvH2MbpneXSZ/URb1vd1WH0Nis= X-Google-Smtp-Source: AGHT+IH1XqT9I7mmGMhydUf5vNQPx3OhWI4O99nkzSgQaOPfI4xCLNTrG1uxFQaaSGp1RtdsZc60fw== X-Received: by 2002:a17:903:2291:b0:206:bbaa:84e7 with SMTP id d9443c01a7336-208d986a958mr4037605ad.40.1726783359965; Thu, 19 Sep 2024 15:02:39 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20794730becsm84638755ad.267.2024.09.19.15.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2024 15:02:39 -0700 (PDT) Date: Thu, 19 Sep 2024 15:02:38 -0700 From: Stephen Hemminger To: Isaac Boukris Cc: users@dpdk.org Subject: Re: Accuracy of rte_get_tsc_hz() compared to linux Message-ID: <20240919150238.27b985e6@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 Rather going off into all the weeds of cpuid and whether the value reported is correct. Perhaps DPDK should just look at the kernel sysfs files??