From patchwork Thu Dec 20 17:42:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gavin Hu X-Patchwork-Id: 49214 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E77A1BDE6; Thu, 20 Dec 2018 18:42:53 +0100 (CET) Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id B5F591BDE1 for ; Thu, 20 Dec 2018 18:42:51 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DCBCC1596; Thu, 20 Dec 2018 09:42:50 -0800 (PST) Received: from net-debian.shanghai.arm.com (net-debian.shanghai.arm.com [10.169.36.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 702533F575; Thu, 20 Dec 2018 09:42:49 -0800 (PST) From: Gavin Hu To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, jerinj@marvell.com, hemant.agrawal@nxp.com, ferruh.yigit@intel.com, Honnappa.Nagarahalli@arm.com, nd@arm.com, Gavin Hu Date: Fri, 21 Dec 2018 01:42:25 +0800 Message-Id: <20181220174229.5834-2-gavin.hu@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181220174229.5834-1-gavin.hu@arm.com> References: <20181220104246.5590-1-gavin.hu@arm.com> <20181220174229.5834-1-gavin.hu@arm.com> Subject: [dpdk-dev] [PATCH v2 1/5] test/spinlock: remove 1us delay for correct benchmarking X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list 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. 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 --- test/test/test_spinlock.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/test/test_spinlock.c b/test/test/test_spinlock.c index 73bff128e..6795195ae 100644 --- a/test/test/test_spinlock.c +++ b/test/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;