From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CBA29A0471 for ; Sat, 20 Jul 2019 08:57:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 581051B4B6; Sat, 20 Jul 2019 08:57:20 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id A4FEA2BE5 for ; Sat, 20 Jul 2019 08:57:18 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x6K6u6Ms003784; Fri, 19 Jul 2019 23:57:14 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=SZVmtgNDTKhGBZre2+9y9neqnk1/YtbmwFtUHjy7buE=; b=LhgJeu1PivtLGsKZhQSKZwNzczp4GVcAF6sd8wbYcU1BGxqGR5taVVToaXzHNTxEPcI/ GYBJCfIwFePV0WwPFga0J84adqBWnNbUv3Nem4auX4OTOulMSd2jjiuFTlgW9hMdlu/t 3RxXWMys2uZH7cAEbvxm6ye89QQbridDVruNY/LZGNkbbf/7HLfWCpgUHmiZkKfTQmXx DD7ehcazZ3Q3D4RZ4KgC/P0SZOF9uK2wU5zKuHclDQOCoReOqUtiK4uDfWtCY2p0Iqoy dfZY4HIcCOp3aHVZhGjmdpzQuhX80+s8X8k5YITKDrrNywLTdZnKmTW9VbknQ4ZnztI6 aw== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2tutsg0fvh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 19 Jul 2019 23:57:14 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 19 Jul 2019 23:57:13 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.52) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Fri, 19 Jul 2019 23:57:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GHLaO8KpI+QM44xUNdZDmHvhb11SX7rhuw3k1MyiK9m0hqNHVQLhFEkXgQb5zXolrR/sSVmcN6rC1GTPruRcarEf0nz1LvyRowN19fvoEVhnrx8pRovApZN9KEJkis0Rxog7MkOAiOlk34EIdO2NHFwAcPaLmMtILxJq2vr/Rbk5xN13VmKzYMuuR/oeedXI8knNePa79Q7Zlxeshnb+lJPfsjXXNG5UVQMXtLzp8evfMZL+wRssRqmS3q7Ll/4tATTCVfRV9Io2vfzcTN8LQcQhAqRlYT1+pj2JTwluI0eQeF8Jdcg8vc9ceZt2F9hEv6ixZ5d4/OBcnR+v2DJH1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SZVmtgNDTKhGBZre2+9y9neqnk1/YtbmwFtUHjy7buE=; b=IbUpQ59WYe0NlVdnNbJNSuQ/JRYD5YXoH8hhja+aUT/M5BYh9S9CEVRqMHJWRm11isONGhUzhkoH2NynM1SbItWD1Gaxc2mLJ2xkA1cWhhCwcAJdiJdWk8r4A4bW08pspJvvqL3nsHvf0glWAcZ0L2J0JIKqOc/ZZEtafEIcaA4EvAKmbvOBr/mltgwb+rCFxuQytlX6WHxXNWfXJO6p6tbgyG+lK0baZIuMdGQ8OgPAm5Ba/PsUOWQTFd9AC+o6+YmE73MgXo0GJ9EE96ymZMRr0wCggKB91AScj2xneANtO6E/Rpe6rPjpzqPRGq1mZScuMOZ6qvH18yHbg1U49Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=marvell.com;dmarc=pass action=none header.from=marvell.com;dkim=pass header.d=marvell.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SZVmtgNDTKhGBZre2+9y9neqnk1/YtbmwFtUHjy7buE=; b=HK1L+007ynGIUNmOqLDHp76hqnAY2TQ/Vo8oOplphY4tStoCo9kzCI0qyh8rX/3HD3X5xODwd6OKIy3aZfOXjqS3yQGr7ds9cxriDllp4mTjE+xSg+c3ghZNEBisFhoxZRjNtk26hPbL1iEzeCLkk6MA7H2qANB0/mo0lJBnrqM= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.14) by CY4PR1801MB1925.namprd18.prod.outlook.com (10.171.255.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.14; Sat, 20 Jul 2019 06:57:10 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::1859:6ecd:9898:f96c]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::1859:6ecd:9898:f96c%7]) with mapi id 15.20.2094.011; Sat, 20 Jul 2019 06:57:10 +0000 From: Pavan Nikhilesh Bhagavatula To: Gavin Hu , "dev@dpdk.org" CC: "nd@arm.com" Thread-Topic: [dpdk-dev] [RFC v2 2/5] ticketlock: use new API to reduce contention on aarch64 Thread-Index: AQHVMX2d4/8GasPQpEaW07gPQ9DmoKbTKwgQ Date: Sat, 20 Jul 2019 06:57:10 +0000 Message-ID: References: <1561911676-37718-1-git-send-email-gavin.hu@arm.com> <1562144316-14687-3-git-send-email-gavin.hu@arm.com> In-Reply-To: <1562144316-14687-3-git-send-email-gavin.hu@arm.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [183.82.17.219] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 65fbdf93-8a00-4d59-9a0b-08d70cdf7c93 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:CY4PR1801MB1925; x-ms-traffictypediagnostic: CY4PR1801MB1925: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:139; x-forefront-prvs: 0104247462 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(366004)(376002)(396003)(136003)(346002)(13464003)(199004)(189003)(305945005)(446003)(26005)(66066001)(11346002)(78486014)(7736002)(74316002)(2501003)(76176011)(102836004)(7696005)(3846002)(52536014)(6506007)(186003)(81156014)(33656002)(110136005)(14444005)(81166006)(316002)(6116002)(256004)(229853002)(8936002)(68736007)(99286004)(476003)(53936002)(71190400001)(4326008)(71200400001)(6246003)(9686003)(76116006)(66946007)(66446008)(64756008)(66556008)(66476007)(55016002)(6436002)(2906002)(486006)(86362001)(25786009)(5660300002)(478600001)(14454004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB1925; H:CY4PR1801MB1863.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: n+zcyZybZlbilGjO1XHPMdbgb7ZzVykNjrX41yzasOCi4jM2vV5ubj/GYIVjeLMt6GWGhK61anPATSn1EDIraGSZQH/889P/jC+R+YcPzSVUxjq7mfCcXK5pGZmw1mD9RQNbF4ltjvV1zCNgyQI5vDu82oNVIWxBvwyhMRRdxvROtFX+uGEGDOaZndki7H0InFhdSYvmcFjiZY6Nw0CV5LzUmKC0si7w7S7vtSByxoPGdK7VOBQ2gRjfvYyc1JwNh4AfdT9PAOJFrvxEcDkvZeequxVw7P9bLQJ5m61hMof4tgcsj4UaA+UR8Rt+/X0b+74PhzWzp3chcewwD6Wzs5gbYKjRPdf3zyU1CwPsDc2XHPWRLx9nMyQZw6kkvA9VRzlHDDa9wqNiLKukJhder/I0XzWhkYEGcagWKqj9nys= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 65fbdf93-8a00-4d59-9a0b-08d70cdf7c93 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2019 06:57:10.2603 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: pbhagavatula@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB1925 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-07-20_04:2019-07-19,2019-07-20 signatures=0 Subject: Re: [dpdk-dev] [RFC v2 2/5] ticketlock: use new API to reduce contention on aarch64 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" >-----Original Message----- >From: dev On Behalf Of Gavin Hu >Sent: Wednesday, July 3, 2019 2:29 PM >To: dev@dpdk.org >Cc: nd@arm.com >Subject: [dpdk-dev] [RFC v2 2/5] ticketlock: use new API to reduce >contention on aarch64 > >While using ticket lock, cores repeatedly poll the lock variable. >This is replaced by rte_wait_until_equal API. > >Running ticketlock_autotest on ThunderX2, with different numbers of >cores >and depths of rings, 3%~8% performance gains were measured. Tested on octeontx2 board. > >Signed-off-by: Gavin Hu >Reviewed-by: Honnappa Nagarahalli Tested-by: Pavan Nikhilesh >--- > lib/librte_eal/common/include/generic/rte_ticketlock.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/lib/librte_eal/common/include/generic/rte_ticketlock.h >b/lib/librte_eal/common/include/generic/rte_ticketlock.h >index 191146f..8fa1f62 100644 >--- a/lib/librte_eal/common/include/generic/rte_ticketlock.h >+++ b/lib/librte_eal/common/include/generic/rte_ticketlock.h >@@ -64,8 +64,7 @@ static inline __rte_experimental void > rte_ticketlock_lock(rte_ticketlock_t *tl) > { > uint16_t me =3D __atomic_fetch_add(&tl->s.next, 1, >__ATOMIC_RELAXED); >- while (__atomic_load_n(&tl->s.current, __ATOMIC_ACQUIRE) >!=3D me) >- rte_pause(); >+ rte_wait_until_equal16(&tl->s.current, me, >__ATOMIC_ACQUIRE); > } > > /** >-- >2.7.4