All of lore.kernel.org
 help / color / mirror / Atom feed
From: "lvenyong@1218.com.cn" <lvenyong@1218.com.cn>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: yangqiang <yangqiang@1218.com.cn>
Subject: eal : rte_rdtsc is wrong on some cpu
Date: Thu, 1 Sep 2016 18:09:28 +0800	[thread overview]
Message-ID: <2016090118092557581322@1218.com.cn> (raw)
In-Reply-To: 2016090118033312296518@1218.com.cn

HI !

rte_rdtsc is wrong on some cpu.  
when  runing on Intel(R) Xeon(R) CPU E5-2640 v2 @ 2.00GHz , it is OK. But on Intel(R) Xeon(R) CPU E5-4610 v2 @ 2.30GHz, it return a very big value sometime.

Here is my test use gdb. It can jump from 26460438829980939  to  2840228530541503 in less one second !

Breakpoint 1,  rte_rdtsc() at dpdk-2.2.0/lib/librte_eal/common/include/arch/x86/rte_cycles.h:104
$184 = {tsc_64 = 0x5e01a008be027f, {lo_32 = 0x8be027f, hi_32 = 0x5e01a0}}
$185 = {tsc_64 = 26460434663867007, {lo_32 = 146670207, hi_32 = 6160800}}
(gdb) 
Continuing.

Breakpoint 2, rte_rdtsc() at dpdk-2.2.0/lib/librte_eal/common/include/arch/x86/rte_cycles.h:104
32 in /home/yangqiang/gajet/gajet_branch/2.0/code/src/nsdpf/tsc_time.h
$186 = {tsc_64 = 0x5e01a1010fdd0b, {lo_32 = 0x10fdd0b, hi_32 = 0x5e01a1}}
$187 = {tsc_64 = 26460438829980939, {lo_32 = 17816843, hi_32 = 6160801}}
(gdb) 
Continuing.

Breakpoint 2, rte_rdtsc() at dpdk-2.2.0/lib/librte_eal/common/include/arch/x86/rte_cycles.h:104
32 in /home/yangqiang/gajet/gajet_branch/2.0/code/src/nsdpf/tsc_time.h
$188 = {tsc_64 = 0xa172c3ca4d3bf, {lo_32 = 0x3ca4d3bf, hi_32 = 0xa172c}}
$189 = {tsc_64 = 2840228530541503, {lo_32 = 1017435071, hi_32 = 661292}}
(gdb) 
Continuing.



lvenyong@1218.com.cn

      reply	other threads:[~2016-09-01 10:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 10:03 eal : rte_rdtsc is wrong on some cpu lvenyong
2016-09-01 10:09 ` lvenyong [this message]

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=2016090118092557581322@1218.com.cn \
    --to=lvenyong@1218.com.cn \
    --cc=dev@dpdk.org \
    --cc=yangqiang@1218.com.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.