Quickly taking and releasing the spinlock can't hit the contentions,
delay 1 us to create contention stress, this can help really show
the performance of spinlock implementation.

Fixes: af75078fece3 ("first public release")
Cc: [email protected]

Signed-off-by: Gavin Hu <[email protected]>
Reviewed-by: Ruifeng Wang <[email protected]>
Reviewed-by: Joyce Kong <[email protected]>
Reviewed-by: Phil Yang <[email protected]>
Reviewed-by: Honnappa Nagarahalli <[email protected]>
Reviewed-by: Ola Liljedahl <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
---
 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)
                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;
-- 
2.7.4

Reply via email to