On Tue, Mar 10, 2020 at 8:09 AM Linhaifeng <haifeng....@huawei.com> wrote:
>
>
>
> -----邮件原件-----
> 发件人: Jerin Jacob [mailto:jerinjac...@gmail.com]
> 发送时间: 2020年3月9日 23:43
> 收件人: Linhaifeng <haifeng....@huawei.com>
> 抄送: dev@dpdk.org; tho...@monjalon.net; Lilijun (Jerry) 
> <jerry.lili...@huawei.com>; chenchanghu <chenchan...@huawei.com>; xudingke 
> <xudin...@huawei.com>
> 主题: Re: [dpdk-dev] [PATCH] cycles: add isb before read cntvct_el0
>
> On Mon, Mar 9, 2020 at 2:43 PM Linhaifeng <haifeng....@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....@huawei.com>

Reply via email to