From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gavin.hu@arm.com>
Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70])
 by dpdk.org (Postfix) with ESMTP id A84E02BA5;
 Fri,  8 Mar 2019 08:16:59 +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 0E50315BE;
 Thu,  7 Mar 2019 23:16:59 -0800 (PST)
Received: from net-arm-thunderx2.shanghai.arm.com
 (net-arm-thunderx2.shanghai.arm.com [10.169.40.121])
 by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2B29C3F71D;
 Thu,  7 Mar 2019 23:16:57 -0800 (PST)
From: Gavin Hu <gavin.hu@arm.com>
To: dev@dpdk.org
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
Date: Fri,  8 Mar 2019 15:16:39 +0800
Message-Id: <1552029401-90697-2-git-send-email-gavin.hu@arm.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1552029401-90697-1-git-send-email-gavin.hu@arm.com>
References: <1552029401-90697-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>
Subject: [dpdk-dev] [PATCH v6 1/3] test/spinlock: dealy 1 us to create
	contention
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 08 Mar 2019 07:17:00 -0000

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: 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>
---
 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