spinlock: use WFE to reduce contention on aarch64
authorGavin Hu <gavin.hu@arm.com>
Wed, 7 Jul 2021 05:48:37 +0000 (13:48 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 9 Jul 2021 19:33:01 +0000 (21:33 +0200)
commitfa6b488998f0a57216a02c7d0ef8ce1e24cb39fe
tree838cbf183d8efd78ba8798b2b5f37908e734f2c1
parent43fb6eea496e6e116b1d29a44f0e0ff0bc73b894
spinlock: use WFE to reduce contention on aarch64

In acquiring a spinlock, cores repeatedly poll the lock variable.
This is replaced by rte_wait_until_equal API.

Running micro benchmarking and testpmd and l3fwd traffic tests
on ThunderX2, Ampere eMAG80 and Arm N1SDP, everything went well
and no notable performance gain nor degradation was measured.

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@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>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
lib/eal/include/generic/rte_spinlock.h