From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gavin Hu Subject: [PATCH v8 1/3] test/spinlock: remove 1us delay for correct benchmarking Date: Fri, 8 Mar 2019 15:56:35 +0800 Message-ID: <1552031797-146710-2-git-send-email-gavin.hu@arm.com> References: <1552031797-146710-1-git-send-email-gavin.hu@arm.com> Cc: nd@arm.com, thomas@monjalon.net, jerinj@marvell.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, Honnappa.Nagarahalli@arm.com, gavin.hu@arm.com, i.maximets@samsung.com, chaozhu@linux.vnet.ibm.com, stable@dpdk.org To: dev@dpdk.org Return-path: In-Reply-To: <1552031797-146710-1-git-send-email-gavin.hu@arm.com> In-Reply-To: <20181220104246.5590-1-gavin.hu@arm.com> References: <20181220104246.5590-1-gavin.hu@arm.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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