[dpdk-dev] [PATCH v2 1/2] eal/arm: generic counter based loop for CPU freq calculation

David Marchand david.marchand at redhat.com
Tue Jul 7 13:16:41 CEST 2020


On Fri, Jun 26, 2020 at 10:35 PM Honnappa Nagarahalli
<honnappa.nagarahalli at arm.com> wrote:
>
> get_tsc_freq uses 'nanosleep' system call to calculate the CPU
> frequency. However, 'nanosleep' results in the process getting
> un-scheduled. The kernel saves and restores the PMU state. This
> ensures that the PMU cycles are not counted towards a sleeping
> process. When RTE_ARM_EAL_RDTSC_USE_PMU is defined, this results
> in incorrect CPU frequency calculation. This logic is replaced
> with generic counter based loop.
>
> Bugzilla ID: 450
> Fixes: f91bcbb2d9a6 ("eal/arm: use high-resolution cycle counter")
> Cc: stable at dpdk.org
>
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
> Reviewed-by: Dharmik Thakkar <dharmik.thakkar at arm.com>
> Reviewed-by: Phil Yang <phil.yang at arm.com>
> Acked-by: Jerin Jacob <jerinj at marvell.com>

Series applied, thanks.


-- 
David Marchand



More information about the dev mailing list