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 EE4F9A2EEB for ; Sat, 14 Sep 2019 17:22:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E52CE1DFE8; Sat, 14 Sep 2019 17:22:10 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150057.outbound.protection.outlook.com [40.107.15.57]) by dpdk.org (Postfix) with ESMTP id 6CBDD1DFE5 for ; Sat, 14 Sep 2019 17:22:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0oejAYQBQTwys22Br04pJ54uze2uLAWWmOeLQdiFXnU=; b=ffsYIsqX9YyOJ2giiuFWyN/IYZHNU/U/90TT1wS7/a7WFMHDXsinyx8+rA92EGWQsWVKasFWcJN6T7zcm6QL+9Y41CbH+xMndWijCNVpPoK2MWrxjCQ5jRmfBdtLztas147gGs5f0aDcsZZKL7MjhMCpl1foF3pGWZ7/xIdFFyQ= Received: from DB7PR08CA0002.eurprd08.prod.outlook.com (2603:10a6:5:16::15) by AM0PR08MB4610.eurprd08.prod.outlook.com (2603:10a6:208:104::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.13; Sat, 14 Sep 2019 15:22:06 +0000 Received: from DB5EUR03FT018.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::207) by DB7PR08CA0002.outlook.office365.com (2603:10a6:5:16::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.14 via Frontend Transport; Sat, 14 Sep 2019 15:22:06 +0000 Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=none action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT018.mail.protection.outlook.com (10.152.20.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.14 via Frontend Transport; Sat, 14 Sep 2019 15:22:04 +0000 Received: ("Tessian outbound 96594883d423:v31"); Sat, 14 Sep 2019 15:22:04 +0000 X-CR-MTA-TID: 64aa7808 Received: from 9e7c298319f4.2 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.0.54]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1F05C930-018C-4167-ADE6-7E929903A740.1; Sat, 14 Sep 2019 15:21:59 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2054.outbound.protection.outlook.com [104.47.0.54]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9e7c298319f4.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sat, 14 Sep 2019 15:21:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nqxiUs2bpj6SqOouLAXjsEuPIgqYy/909SprW98WphYoua5oNlVoMHXqsu76zWocQuc1QXbOJGzPzqTJUeMo8gfL2rolLSXTvmmOPzjn3a6C4rKkAb6Xly+0/jK3hdx32a59A4UiKuCqgbuww4SEBsm7w84o6w9ydc5f3XXVuzz/xDN75xLBbUZmZs1KoI2gHI8OIQJA/lSMA+ro49FQ7PZGxs9djxfHWDZvvsanEYK017JY6YKJKXWP5Q84HAbSueAOCJKIecuk0NFHqLcVxBwC0Iw2aRn39wsQCKEnpAEsH0IERtPblxCtqDC1NnFjxn6bJwTdJbEGO+y+BLQR2g== 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=NWDNB00vzSV51cTPsFZ8/x8/iGyFGVTqU+mzR39c6OY=; b=MkrsG6QL9+6P1qIbnTdUv3ipMwyfUTgv82tf3Jw55FESXumPJz3ZRFBKjs8hEaUcRY0Dxo2VLoNJP3XCYh4tsgrXrTiIeuK7Wa2fkuA3MmRxzgCy/k2TpInXpRdZMAQ0yXMQejCzhSpWOkXkzYWyjta1WtW0U09e8oODvx6TcQpzZrO462CWSYAmStxc+ABLmVMFt4aPuj4+m4wdBSw1nz9/gY8tYQRvTg7F8FmKHDmZc5AfRhxsGf4McHHRAON1dneX3Ee8ugRAUMG5aStXifWqkqlGMMnYFtZLw4ckdSfN12pkayMAT6F/fnMl0cSsTLfucrswPg/CLJIbkfat2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NWDNB00vzSV51cTPsFZ8/x8/iGyFGVTqU+mzR39c6OY=; b=C7wlhSmXob4yRN7CTGxpJGzjOVfkjIzzu+CKU1sC9nR6OvSTPHnXRKuXS5s79bJpxnnUZ4+Dd1WBSiYiV4j/P5M5fNMN0jpZs0vzphkcIbWrazhG1EIvp2nRxbtsVuCTRf4ao3pTPT2mGySngm1ayJDHW+kjUKcuMmS9cAXo2NE= Received: from VI1PR08MB5376.eurprd08.prod.outlook.com (52.133.244.200) by VI1PR08MB2831.eurprd08.prod.outlook.com (10.170.236.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2241.20; Sat, 14 Sep 2019 15:21:56 +0000 Received: from VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::c09a:49d3:eab2:f707]) by VI1PR08MB5376.eurprd08.prod.outlook.com ([fe80::c09a:49d3:eab2:f707%3]) with mapi id 15.20.2263.021; Sat, 14 Sep 2019 15:21:56 +0000 From: "Gavin Hu (Arm Technology China)" To: Pavan Nikhilesh Bhagavatula , "jerinj@marvell.com" CC: "dev@dpdk.org" , Honnappa Nagarahalli , "Phil Yang (Arm Technology China)" , "Ruifeng Wang (Arm Technology China)" Thread-Topic: [EXT] [PATCH v4 5/6] spinlock: use wfe to reduce contention on aarch64 Thread-Index: AQHVaUZPMo5PmtMDEEyNR0IpAQXIGKcnwpKggAOIRTA= Date: Sat, 14 Sep 2019 15:21:56 +0000 Message-ID: References: <1561911676-37718-1-git-send-email-gavin.hu@arm.com> <1566454356-37277-6-git-send-email-gavin.hu@arm.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 1664b061-bd87-4d46-90d1-63fab90d228d.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: e5edfbb8-58f2-4550-cd48-08d739274ca2 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam-Untrusted: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600166)(711020)(4605104)(1401327)(4618075)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VI1PR08MB2831; X-MS-TrafficTypeDiagnostic: VI1PR08MB2831:|VI1PR08MB2831:|AM0PR08MB4610: X-MS-Exchange-PUrlCount: 2 x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:9508;OLM:9508; x-forefront-prvs: 01604FB62B X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(39850400004)(366004)(346002)(376002)(136003)(396003)(189003)(199004)(13464003)(476003)(256004)(6506007)(54906003)(25786009)(6436002)(14454004)(305945005)(71200400001)(316002)(26005)(99286004)(14444005)(76116006)(4326008)(66556008)(2906002)(7696005)(229853002)(66476007)(76176011)(81156014)(478600001)(64756008)(186003)(81166006)(486006)(6116002)(9686003)(71190400001)(3846002)(11346002)(66066001)(5660300002)(8676002)(53936002)(966005)(55016002)(66446008)(74316002)(2501003)(8936002)(52536014)(110136005)(66946007)(7736002)(53546011)(86362001)(6306002)(446003)(33656002)(55236004)(102836004)(6246003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB2831; H:VI1PR08MB5376.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: t+d+M151F6JYp+9HBo/E0Pqv63hrnX/4Qvrwvt3RVzxdxYwyHioyzCzaIoCV2Kjmk/c9GOUfiM2EQkICMAQnIn9NaO9l2X8WwJio6HvUiKJB03FQeyZi1RU0Nxm0Qyml1X4o0YhCFr16L3+pduQ6Ec5/QdlUXrjy5Acyy7gH8A9Oh7VEvvOzEJVDIVsXSEWjXYrreqkVtTMPeMbR7aKrcLWXkoG882V+Nqsp8LO7/Ux6tQvMvowRvxZ2ZfeKcJAzYoTKQSP7pOucK6Tv40ht51MBG+xByKHwzIBV6A602yAU4lE/UkxtvcrC+AgDfFnPO4+ZZMgRpnpGEYDmk6nXHEfBegqQCydhhJ/7CABwsuyhJlGjMeV0wNXkiJY/t1F9ccaRv5CApt57CthqwohFi22Nj35OSUr4TI5PB4LVB+4= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2831 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT018.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(39850400004)(396003)(346002)(376002)(136003)(40434004)(13464003)(189003)(199004)(86362001)(22756006)(54906003)(316002)(97756001)(99286004)(14444005)(5024004)(3846002)(46406003)(356004)(53546011)(6506007)(23726003)(50466002)(6116002)(26826003)(7696005)(2906002)(4326008)(966005)(33656002)(478600001)(76130400001)(76176011)(110136005)(25786009)(74316002)(55016002)(305945005)(14454004)(229853002)(70206006)(81166006)(47776003)(476003)(6306002)(5660300002)(66066001)(7736002)(102836004)(52536014)(186003)(63350400001)(26005)(8676002)(6246003)(81156014)(2501003)(70586007)(8936002)(8746002)(11346002)(126002)(446003)(486006)(336012)(9686003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB4610; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:TempError; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; MX:1; A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 023095ed-7ce8-4779-efc2-08d73927479c X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(710020)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM0PR08MB4610; X-Forefront-PRVS: 01604FB62B X-Microsoft-Antispam-Message-Info: 09Tz0p5abLrYdv1ZaknPYuJNMxIU8WQscdnFu6wO3igb0BPFjq1uj+l7WDfQh04WS4yqeC2BANMdp6xqyikPkSMRFvUqhXv1pgPAIHbqQ8cG4L7YuJz3lyE8qGgFEiRFjeR4SOaNQYW6Gg3W/UHxTAc5RtuLrsNhSeIyvI4OfZL4Bf1uW6NOg2nYGZnoVY3fmRBlRQAExWOd0uAjxWQSksUpwr8keuPmo8p9RdyNMGpkx2i8UkuhfTRvUim7cUCbRA+QjTm129kdyZVq3PubQ42kGqx5O0WO3Lu23VlwatUrO6dWZJIhf8qtaiadXoqRg0dvhsYxRrkFWWd7tW5QcnTag5HsfX05/nT1K5QKm6VC4cVccyaoswTkH76N7JIDZGbV+/B/OACFR8VK1l4nB3YV2H8niL86MgwfWoC6BpM= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2019 15:22:04.7719 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e5edfbb8-58f2-4550-cd48-08d739274ca2 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4610 Subject: Re: [dpdk-dev] [EXT] [PATCH v4 5/6] spinlock: use wfe 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" Hi Jerin, Add the offlist discussion with Pavan to facilitate the review for the spin= lock patch(currently in v6). Thanks Pavan and Jerin for review. Best Regards, Gavin > -----Original Message----- > From: Gavin Hu (Arm Technology China) > Sent: Thursday, September 12, 2019 5:22 PM > To: Pavan Nikhilesh Bhagavatula > Subject: RE: [EXT] [PATCH v4 5/6] spinlock: use wfe to reduce contention = on > aarch64 > > Hi Pavan, > > Thanks for pointing this out, it was implemented in the API already. > Spinlock did not use the API to save a comparison branch(loading 0 to a r= eg > and compare against). > > Anyway it is also a good idea to add it into this asm code. > > Best Regards, > Gavin > > > -----Original Message----- > > From: Pavan Nikhilesh Bhagavatula > > Sent: Thursday, September 12, 2019 4:45 PM > > To: Gavin Hu (Arm Technology China) > > Subject: RE: [EXT] [PATCH v4 5/6] spinlock: use wfe to reduce contentio= n on > > aarch64 > > > > Hi Gavin, (Offlist) > > > > I there a reason why the below asm doesn't use early exit as discussed = in > > http://patches.dpdk.org/patch/55669/ > > > > Regards, > > Pavan. > > > > >+#ifndef RTE_FORCE_INTRINSICS > > >+static inline void > > >+rte_spinlock_lock(rte_spinlock_t *sl) > > >+{ > > >+ unsigned int tmp; > > >+ /* > > >http://infocenter.arm.com/help/index.jsp?topic=3D/com.arm.doc. > > >+ * faqs/ka16809.html > > >+ */ > > >+ asm volatile( > > >+ "sevl\n" > > >+ "1: wfe\n" > > >+ "2: ldaxr %w[tmp], %w[locked]\n" > > >+ "cbnz %w[tmp], 1b\n" > > >+ "stxr %w[tmp], %w[one], %w[locked]\n" > > >+ "cbnz %w[tmp], 2b\n" > > >+ : [tmp] "=3D&r" (tmp), [locked] "+Q"(sl->locked) > > >+ : [one] "r" (1) > > >+ : "cc", "memory"); > > >+} > > >+#endif > > >+ > > > static inline int rte_tm_supported(void) > > > { > > > return 0; > > >-- > > >2.7.4 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.