DPDK patches and discussions
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [Bug 959] tsc hz not matching kernel reported tcs frequency
Date: Wed, 16 Mar 2022 12:58:18 +0000	[thread overview]
Message-ID: <bug-959-3@http.bugs.dpdk.org/> (raw)

https://bugs.dpdk.org/show_bug.cgi?id=959

            Bug ID: 959
           Summary: tsc hz not matching kernel reported tcs frequency
           Product: DPDK
           Version: 21.11
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: dev@dpdk.org
          Reporter: maria.lingemark@ericsson.com
  Target Milestone: ---

On some machines the dpdk value of tsc hz does not match the kernel value.

The effect of this can be observed by writing a small test program that
measures elapsed time using two different sources.

The issue has been shown by taking clock_gettime() and rte_get_tsc_cycles(),
sleep, and then fetch the time stamps again with clock_gettime() and
rte_get_tsc_cycles().

When calculating the time from the two sources we notice a difference of ~2.3
ms per second.

Example from a test run with 1 second sleep:

rte_get_tsc_hz=2400000000
clock_gettime=1000056 us, tsc_time=997708 us, diff=2348 us

Info from dmesg:
tsc: Refined TSC clocksource calibration: 2394.365 MHz

We don't see the time difference on 
Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
Linux kernel 4.13.0-16-generic

but we do observe it on 
Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
Linux kernel 5.4.0-100-generic

-- 
You are receiving this mail because:
You are the assignee for the bug.

                 reply	other threads:[~2022-03-16 12:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-959-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).