From: Gavin Hu Date: Fri, 8 Mar 2019 07:56:35 +0000 (+0800) Subject: test/spinlock: remove delay for correct benchmarking X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9119ad305db027b5c87e27b13fde9d60f9aa9a1f;p=dpdk.git 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 Reviewed-by: Ruifeng Wang Reviewed-by: Joyce Kong Reviewed-by: Phil Yang Reviewed-by: Honnappa Nagarahalli Reviewed-by: Ola Liljedahl Acked-by: Jerin Jacob Acked-by: Nipun Gupta Acked-by: Konstantin Ananyev --- diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c index 73bff128e6..6795195aee 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;