[dpdk-dev] [PATCH v7 1/3] test/spinlock: remove 1us delay for correct benchmarking

Gavin Hu gavin.hu at arm.com
Fri Mar 8 08:37:29 CET 2019

The test is to benchmark the performance of spinlock by counting the
number of spinlock acquire and release operations within the specified
A typical pair of lock and unlock operations costs tens or hundreds of
nano seconds, in comparison to this, delaying 1 us outside of the locked
region is too much, compromising the goal of benchmarking the lock and
unlock performance.

Fixes: af75078fece3 ("first public release")
Cc: stable at dpdk.org

Change-Id: I7cc025e76082bb84de3d7cd5002e850f89b30eae
Jira: ENTNET-1047
Signed-off-by: Gavin Hu <gavin.hu at arm.com>
Reviewed-by: Ruifeng Wang <Ruifeng.Wang at arm.com>
Reviewed-by: Joyce Kong <Joyce.Kong at arm.com>
Reviewed-by: Phil Yang <phil.yang at arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>
Reviewed-by: Ola Liljedahl <Ola.Liljedahl at arm.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
 app/test/test_spinlock.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c
index 73bff12..6795195 100644
--- a/app/test/test_spinlock.c
+++ b/app/test/test_spinlock.c
@@ -120,8 +120,6 @@ load_loop_fn(void *func_param)
 		if (use_lock)
-		/* delay to make lock duty cycle slighlty realistic */
-		rte_delay_us(1);
 		time_diff = rte_get_timer_cycles() - begin;
 	lock_count[lcore] = lcount;

More information about the dev mailing list