test/spinlock: remove delay for correct benchmarking
authorGavin Hu <gavin.hu@arm.com>
Fri, 8 Mar 2019 07:56:35 +0000 (15:56 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 28 Mar 2019 08:17:49 +0000 (09:17 +0100)
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>
app/test/test_spinlock.c

index 73bff12..6795195 100644 (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;