eal: add wait until equal API
authorGavin Hu <gavin.hu@arm.com>
Thu, 7 Nov 2019 21:35:25 +0000 (22:35 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 17 Jan 2020 11:02:21 +0000 (12:02 +0100)
commit1be7855d7739d08f618abfafd0e7b05d85406289
tree01e87b188a471619cbee11c91b139eafebf6d862
parent24ffb8c58963c86be5a53ce61896934a96a83234
eal: add wait until equal API

The rte_wait_until_equal_xx APIs abstract the functionality of
'polling for a memory location to become equal to a given value'.

Add the RTE_ARM_USE_WFE configuration entry for aarch64, disabled
by default. When it is enabled, the above APIs will call WFE instruction
to save CPU cycles and power.

From a VM, when calling this API on aarch64, it may trap in and out to
release vCPUs whereas cause high exit latency. Since kernel 4.18.20 an
adaptive trapping mechanism is introduced to balance the latency and
workload.

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
config/arm/meson.build
config/common_base
doc/guides/rel_notes/release_20_02.rst
lib/librte_eal/common/include/arch/arm/rte_pause_64.h
lib/librte_eal/common/include/generic/rte_pause.h