On Tue, Mar 10, 2020 at 8:09 AM Linhaifeng <[email protected]> wrote:
>
>
>
> -----邮件原件-----
> 发件人: Jerin Jacob [mailto:[email protected]]
> 发送时间: 2020年3月9日 23:43
> 收件人: Linhaifeng <[email protected]>
> 抄送: [email protected]; [email protected]; Lilijun (Jerry) 
> <[email protected]>; chenchanghu <[email protected]>; xudingke 
> <[email protected]>
> 主题: Re: [dpdk-dev] [PATCH] cycles: add isb before read cntvct_el0
>
> On Mon, Mar 9, 2020 at 2:43 PM Linhaifeng <[email protected]> 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 <[email protected]>

Reply via email to