eal: calibrate TSC only in primary process
authorJim Harris <james.r.harris@intel.com>
Mon, 7 Oct 2019 15:28:21 +0000 (08:28 -0700)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 18 Oct 2019 11:23:10 +0000 (13:23 +0200)
commitb30b134f82a19096fa096cf9bfa9822bec2e6c49
treeaf8f03ae274e4f4f55d2e1708de679402a170d5e
parentb36f587f010bba421a8fd0b4c383276ecb796ae3
eal: calibrate TSC only in primary process

This ensures secondary processes never have to calculate the TSC rate
themselves, which can be noticeable in VMs that don't have access to
arch-specific detection mechanism (such as CPUID leaf 0x15 or MSR 0xCE
on x86).

Since rte_mem_config is now internal to the EAL library, we can add
tsc_hz without ABI breakage concerns.

Reduces rte_eal_init() execution time in a secondary process from 165ms
to 66ms on my test system.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_eal/common/eal_common_timer.c
lib/librte_eal/common/eal_memcfg.h