From: Jerin Jacob <jerinjacobk@gmail.com>
To: Linhaifeng <haifeng.lin@huawei.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"thomas@monjalon.net" <thomas@monjalon.net>,
"Lilijun (Jerry)" <jerry.lilijun@huawei.com>,
chenchanghu <chenchanghu@huawei.com>,
xudingke <xudingke@huawei.com>
Subject: Re: [dpdk-dev] [PATCH] cycles: add isb before read cntvct_el0
Date: Tue, 10 Mar 2020 13:23:15 +0530 [thread overview]
Message-ID: <CALBAE1PhiK+O7qxt5qm9585z9VNA_JbTb2E_tkg6K4aaHCmtvQ@mail.gmail.com> (raw)
In-Reply-To: <4099DE2E54AFAD489356C6C9161D53339729F32B@DGGEML502-MBX.china.huawei.com>
On Tue, Mar 10, 2020 at 8:09 AM Linhaifeng <haifeng.lin@huawei.com> wrote:
>
>
>
> -----邮件原件-----
> 发件人: Jerin Jacob [mailto:jerinjacobk@gmail.com]
> 发送时间: 2020年3月9日 23:43
> 收件人: Linhaifeng <haifeng.lin@huawei.com>
> 抄送: dev@dpdk.org; thomas@monjalon.net; Lilijun (Jerry) <jerry.lilijun@huawei.com>; chenchanghu <chenchanghu@huawei.com>; xudingke <xudingke@huawei.com>
> 主题: Re: [dpdk-dev] [PATCH] cycles: add isb before read cntvct_el0
>
> On Mon, Mar 9, 2020 at 2:43 PM Linhaifeng <haifeng.lin@huawei.com> wrote:
> >
> > We nead isb rather than dsb to sync system counter to cntvct_el0.
>
> # Currently rte_rdtsc() does not have dsb. Right? or any barriers.
> # Why do you need it? If it regarding, getting accurate value then use rte_rdtsc_precise().
>
> We use rte_get_tsc_cycles get start_value in pmd1 and end_value in pmd2 in our qos module, it works ok in x86 but not ok in arm64.
>
> Then we use rte_mb() to sync instruction but it not work.Because rte_mb is dsb I think it only have affect on memory. cntvct_el0 and system counter is register so I think we should use isb.
>
> It works well after we use isb in multi core scenes.
>
> Use rte_rdtsc_precise is good idea. Maybe use isb replace of rte_mb(dsb) ?
Yes. Please.
>
> >
> > Signed-off-by: Haifeng Lin <haifeng.lin@huawei.com>
next prev parent reply other threads:[~2020-03-10 7:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 9:13 Linhaifeng
2020-03-09 9:19 ` David Marchand
2020-03-10 2:51 ` [dpdk-dev] 答复: " Linhaifeng
2020-03-09 15:43 ` [dpdk-dev] " Jerin Jacob
2020-03-10 2:39 ` [dpdk-dev] 答复: " Linhaifeng
2020-03-10 7:53 ` Jerin Jacob [this message]
2020-03-09 9:22 [dpdk-dev] " Linhaifeng
2020-03-10 7:11 ` Gavin Hu
2020-03-10 7:22 ` Linhaifeng
2020-03-10 7:50 ` Jerin Jacob
2020-03-09 10:58 Linhaifeng
2020-03-09 11:05 Linhaifeng
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=CALBAE1PhiK+O7qxt5qm9585z9VNA_JbTb2E_tkg6K4aaHCmtvQ@mail.gmail.com \
--to=jerinjacobk@gmail.com \
--cc=chenchanghu@huawei.com \
--cc=dev@dpdk.org \
--cc=haifeng.lin@huawei.com \
--cc=jerry.lilijun@huawei.com \
--cc=thomas@monjalon.net \
--cc=xudingke@huawei.com \
/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).