summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGavin Hu <gavin.hu@arm.com>2019-03-08 15:56:35 +0800
committerThomas Monjalon <thomas@monjalon.net>2019-03-28 09:17:49 +0100
commit9119ad305db027b5c87e27b13fde9d60f9aa9a1f (patch)
treeb09b54360b107b26d07d6d1dda32e9c4b3231bd3 /app
parent85cffb2eccd9edf89a9e28539206a79258a6e9d9 (diff)
downloaddpdk-next-eventdev-9119ad305db027b5c87e27b13fde9d60f9aa9a1f.zip
dpdk-next-eventdev-9119ad305db027b5c87e27b13fde9d60f9aa9a1f.tar.gz
dpdk-next-eventdev-9119ad305db027b5c87e27b13fde9d60f9aa9a1f.tar.xz
test/spinlock: remove delay for correct benchmarking
The test is to benchmark the performance of spinlock by counting the number of spinlock acquire and release operations within the specified time. 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@dpdk.org Signed-off-by: Gavin Hu <gavin.hu@arm.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com> Reviewed-by: Joyce Kong <joyce.kong@arm.com> Reviewed-by: Phil Yang <phil.yang@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Nipun Gupta <nipun.gupta@nxp.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Diffstat (limited to 'app')
-rw-r--r--app/test/test_spinlock.c2
1 files changed, 0 insertions, 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)
lcount++;
if (use_lock)
rte_spinlock_unlock(&lk);
- /* delay to make lock duty cycle slighlty realistic */
- rte_delay_us(1);
time_diff = rte_get_timer_cycles() - begin;
}
lock_count[lcore] = lcount;