From: "lvenyong@1218.com.cn" <lvenyong@1218.com.cn>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: yangqiang <yangqiang@1218.com.cn>
Subject: [dpdk-dev] eal : rte_rdtsc is wrong on some cpu
Date: Thu, 1 Sep 2016 18:03:33 +0800 [thread overview]
Message-ID: <2016090118033312296518@1218.com.cn> (raw)
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.
Breakpoint 2, tsc_time () at /home/yangqiang/gajet/gajet_branch/2.0/code/src/nsdpf/tsc_time.h:32
32 in /home/yangqiang/gajet/gajet_branch/2.0/code/src/nsdpf/tsc_time.h
$190 = {tsc_64 = 0xa172c7cd5f131, {lo_32 = 0x7cd5f131, hi_32 = 0xa172c}}
$191 = {tsc_64 = 2840229607502129, {lo_32 = 2094395697, hi_32 = 661292}}
lvenyong@1218.com.cn
next reply other threads:[~2016-09-01 10:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-01 10:03 lvenyong [this message]
2016-09-01 10:09 ` lvenyong
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=2016090118033312296518@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 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).