eal/x86: reduce contention when retrying TSX
authorBruce Richardson <bruce.richardson@intel.com>
Mon, 12 Nov 2018 10:47:18 +0000 (10:47 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 14 Nov 2018 00:03:21 +0000 (01:03 +0100)
commite5f9a65147f857f70bcf366552745140d948bf7c
treee249dffa7ce5be9274adb14ea73c59ce7777426c
parent606bd11736a210aa79fe5da4ea0cb3a9cbcde4a0
eal/x86: reduce contention when retrying TSX

When TSX transactions abort, it is generally worth retrying a number of
times before falling back to the traditional locking path, as the
parallelism benefits from TSX can be worth it when a transaction does
succeed. For cases with multiple threads and high contention rates, it
can be useful to have increasing delays between retry attempts, so as to
avoid having the same threads repeatedly collided.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_eal/common/include/arch/x86/rte_spinlock.h
lib/librte_eal/linuxapp/eal/eal_alarm.c