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: af75078fec ("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>
This commit is contained in:
Gavin Hu 2019-03-08 15:56:35 +08:00 committed by Thomas Monjalon
parent 85cffb2ecc
commit 9119ad305d

View File

@ -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;