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 027D5A00C2; Fri, 24 Apr 2020 16:46:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6B64B1C2F9; Fri, 24 Apr 2020 16:46:14 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2046.outbound.protection.outlook.com [40.107.21.46]) by dpdk.org (Postfix) with ESMTP id 9C65E1C2F3 for ; Fri, 24 Apr 2020 16:46:12 +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=+CxrfwzRlt4CbufMFhf1MJwm1O9vZzFtQ3dXwGfMji8=; b=BSdPbhYCAf6ehzd9/H3GBqjfBX7nWLVR8FYtvchQ3TLydxmzMNsk+G52k6QSZxtHsHwK5EOQ5FBvWsTkN9vnhVefBQoJu0xGPeHDJbzJDuK5EwCn0KMhyfYj0RYyw+p1v5A0phXO2FNEmQN+tEg8EHGteOj6mHsdod6hHR+WFq4= Received: from AM6PR05CA0008.eurprd05.prod.outlook.com (2603:10a6:20b:2e::21) by DB6PR0801MB1639.eurprd08.prod.outlook.com (2603:10a6:4:3b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Fri, 24 Apr 2020 14:46:11 +0000 Received: from AM5EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:2e:cafe::cb) by AM6PR05CA0008.outlook.office365.com (2603:10a6:20b:2e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Fri, 24 Apr 2020 14:46:11 +0000 Authentication-Results: spf=pass (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=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT013.mail.protection.outlook.com (10.152.16.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.19 via Frontend Transport; Fri, 24 Apr 2020 14:46:10 +0000 Received: ("Tessian outbound 76e9a4cf1540:v53"); Fri, 24 Apr 2020 14:46:10 +0000 X-CR-MTA-TID: 64aa7808 Received: from 4a391417ea62.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id ED01A159-59A9-44D8-8157-58945DF641CE.1; Fri, 24 Apr 2020 14:46:05 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4a391417ea62.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 24 Apr 2020 14:46:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LRWtafSR3YR6mmOE83rXlgLBFzdqTyxvx6mZGKKauqIFI/fmVN1XGDBdFX3Ey/p/Mn93T3BcijNbgKf4ib2aRt0hsIhZ/Fz89ECdwDw4qTMciG8l7wvg6UsJaJARUpHDT6hJS1g8Zrn+NahQL/g8c7dNByK+sFzPi3dsyD4zEc7VqEriOYi6SP3ILK/7ZzoymYCyBRwhet6pWVpyCMZU0JTrAxSknn00TOiKWIV9R9C36T1lvQrKtZx9HZV3RnTu85Xk9iPzJIfNkUyPN+BR+Rjjw2A+i8Zw268TZxKXCkC5Cp+P4bIOwmc29Kqr9AweHZT+928ZJcmXTSrydo1zkA== 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=+CxrfwzRlt4CbufMFhf1MJwm1O9vZzFtQ3dXwGfMji8=; b=U2kT/ajL1N50mr5JYiKT1nTQN4YZwBDuDIdljKdzlAlsNmtbDFXOFkFn6dNfyopvUCMDS077GF/COvp8gXa75EmPVTBQWogFoR06Pppaq5ybm1kGPv6aSnqo+a82fDAAtWibalhhXdyAxV7X/GbuTh2V8yX38N5l11kL0jGHLc8ZWOKvCBppsZys3iT6K6enW5OBIvtTpyzPS1CJOkb8x08/34fgvZrXXSr6TnSGe2QwMjIQ8jb2LVUr7mAn+0r3mXBdzDz6qxTOVl55pG1fp3voo+x4f+lGO/b6XUCs4AUSj2A0sqzWLUaq94NBmvmJatmBUDJWko1GtyDA41iLcw== 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=+CxrfwzRlt4CbufMFhf1MJwm1O9vZzFtQ3dXwGfMji8=; b=BSdPbhYCAf6ehzd9/H3GBqjfBX7nWLVR8FYtvchQ3TLydxmzMNsk+G52k6QSZxtHsHwK5EOQ5FBvWsTkN9vnhVefBQoJu0xGPeHDJbzJDuK5EwCn0KMhyfYj0RYyw+p1v5A0phXO2FNEmQN+tEg8EHGteOj6mHsdod6hHR+WFq4= Received: from DBBPR08MB4646.eurprd08.prod.outlook.com (2603:10a6:10:f5::16) by DBBPR08MB4332.eurprd08.prod.outlook.com (2603:10a6:10:d0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13; Fri, 24 Apr 2020 14:46:05 +0000 Received: from DBBPR08MB4646.eurprd08.prod.outlook.com ([fe80::1870:afc4:b90f:609d]) by DBBPR08MB4646.eurprd08.prod.outlook.com ([fe80::1870:afc4:b90f:609d%5]) with mapi id 15.20.2921.030; Fri, 24 Apr 2020 14:46:04 +0000 From: Honnappa Nagarahalli To: Gavin Hu , "dev@dpdk.org" CC: nd , "david.marchand@redhat.com" , "thomas@monjalon.net" , "jerinj@marvell.com" , Ruifeng Wang , Phil Yang , Joyce Kong , Honnappa Nagarahalli , nd Thread-Topic: [PATCH v1 2/2] ring: use wfe to wait for ring tail update on aarch64 Thread-Index: AQHWGgccO1Yxkwsd+EOD3mMJ+xy7CqiIWWXw Date: Fri, 24 Apr 2020 14:46:04 +0000 Message-ID: References: <20200424070741.16619-1-gavin.hu@arm.com> <20200424070741.16619-3-gavin.hu@arm.com> In-Reply-To: <20200424070741.16619-3-gavin.hu@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 707a6689-11ca-4b38-aa79-ac2503f268bd.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [70.113.25.165] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3a6fbbff-0f13-4d80-bead-08d7e85e3aff x-ms-traffictypediagnostic: DBBPR08MB4332:|DBBPR08MB4332:|DB6PR0801MB1639: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:8882;OLM:8882; x-forefront-prvs: 03838E948C X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBBPR08MB4646.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(396003)(39860400002)(366004)(346002)(376002)(66446008)(186003)(26005)(8676002)(316002)(66476007)(86362001)(76116006)(81156014)(478600001)(66556008)(64756008)(66946007)(71200400001)(54906003)(110136005)(7696005)(8936002)(33656002)(55016002)(15650500001)(6506007)(52536014)(2906002)(4326008)(5660300002)(9686003); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 7knj0hiKZcL4esixZ4fmVGGCeJwG2TPAIe6YIeRxy1xVcQBw8CC2qEr4JWD1DnY69CrpvHOTR2TwmrGJzSvqFNqE0K0rMlBsqbkCl4RZpCCgfH4Ln4pmGOxnuw0N7X544DtW1mE26zGQ9IntTAnQdC+nIzDU8rXp8WVhwoU7KFMisHMSviFbkwCgKlJ+izqzaS/2JCnoJOIOpiM9xV+EZA6yr9WDjhy4G2syidOhfW5nLFmHLDiKoooFWX822hDFnf65pzdyjEvjwDpCuQq5HjowVv73wzkfVbDI0r2s5dqjVNDg2T+2jmBx+0IOo/Rik23UwfBVVCH3tRAQ0OnqKn3g50bUCc7Ibe2d8Gt0y0wM9aSfwGjdH36pcKx8d7+9MBQPXCAxDJ+zndY/8GXx4Nm/ufUNxXVDpYgfCZwJKKNQMzbqbHdgfluKOv/RSQyC x-ms-exchange-antispam-messagedata: Ooh97Mhrwpt1OtiDvwbb+scRCVlqZRGIl4ZM0zIsSRdDj0E8kMPqqhNlu8hL5PKBcjVyZnfrqLPZf19xnGhJFVLxsiRtPD70Dr6otrVGijQgDsL7bGlzIa3+XejgBVfKtzM3oumjbCOq4nhIjrjbRA== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4332 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT013.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(136003)(39860400002)(396003)(376002)(346002)(46966005)(5660300002)(110136005)(54906003)(55016002)(70206006)(52536014)(70586007)(478600001)(33656002)(86362001)(9686003)(356005)(47076004)(36906005)(8936002)(6506007)(7696005)(4326008)(82310400002)(336012)(316002)(82740400003)(15650500001)(186003)(8676002)(81166007)(26005)(2906002)(81156014); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 315b0e40-a4e0-478e-661f-08d7e85e3720 X-Forefront-PRVS: 03838E948C X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kgkdXx7kRWrWIAyO1QJGIRtIkmyzXVNqpBlPJa5qXdJPhjtzH8tAULh7OrxGuzcCEM0pyIZ1sIKeyFvVFUZ5xpOSEYjChhu00pgpiKK++0RDGUTujHV8O3+4AL6RkDkxacdM/iY+TzD2pAITir+/7YVeFgsBOHClzxsM87A15lCXLKJzbyVsBjBGwmM2D0oablYj1YGNt7ungWZzzrY2M1n2w6iw9k441d48u9GOq9Z2FZd+VERGluHhH0vhgfZXRqC9luKbkQEDiddf7ZDHTII35sxbK/AVU/Jaf1x8PW24bIDsWUKlRMyNWv6weRiT0H4GiMnqGuLnYLK6D4M8rXTvK3bDMV/d896DFKDAzvn5sOpt2+GK+BlusyW2KbjL659HEIDOzwhqHON0SqU7cXElMAijfo/ijZHHusNDbajdKpq4v8arZz0qKJNFvX7rllDdOoIFBAOW3+KB7SlYI9OFFkWjFj95vE4qopwlDj7pWX900AKG3/vIpnh20IsborHTFx/Lc9nZpVHPF2gPTw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2020 14:46:10.9983 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3a6fbbff-0f13-4d80-bead-08d7e85e3aff 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: DB6PR0801MB1639 Subject: Re: [dpdk-dev] [PATCH v1 2/2] ring: use wfe to wait for ring tail update 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 Gavin, There are other sync modes added to rte_ring library. Can you please exten= d this to other rte_pause() calls in the library? Thanks, Honnappa > Subject: [PATCH v1 2/2] ring: use wfe to wait for ring tail update on aar= ch64 >=20 > Instead of polling for tail to be updated, use wfe instruction. >=20 > Signed-off-by: Gavin Hu > Reviewed-by: Ruifeng Wang > Reviewed-by: Steve Capper > Reviewed-by: Ola Liljedahl > Reviewed-by: Honnappa Nagarahalli > --- > lib/librte_ring/rte_ring_c11_mem.h | 4 ++-- > lib/librte_ring/rte_ring_generic.h | 3 +-- > 2 files changed, 3 insertions(+), 4 deletions(-) >=20 > diff --git a/lib/librte_ring/rte_ring_c11_mem.h > b/lib/librte_ring/rte_ring_c11_mem.h > index 0fb73a337..764d8f186 100644 > --- a/lib/librte_ring/rte_ring_c11_mem.h > +++ b/lib/librte_ring/rte_ring_c11_mem.h > @@ -2,6 +2,7 @@ > * > * Copyright (c) 2017,2018 HXT-semitech Corporation. > * Copyright (c) 2007-2009 Kip Macy kmacy@freebsd.org > + * Copyright (c) 2019 Arm Limited > * All rights reserved. > * Derived from FreeBSD's bufring.h > * Used as BSD-3 Licensed with permission from Kip Macy. > @@ -21,8 +22,7 @@ update_tail(struct rte_ring_headtail *ht, uint32_t > old_val, uint32_t new_val, > * we need to wait for them to complete > */ > if (!single) > - while (unlikely(ht->tail !=3D old_val)) > - rte_pause(); > + rte_wait_until_equal_relaxed_32(&ht->tail, old_val); >=20 > __atomic_store_n(&ht->tail, new_val, __ATOMIC_RELEASE); } diff -- > git a/lib/librte_ring/rte_ring_generic.h b/lib/librte_ring/rte_ring_gener= ic.h > index 953cdbbd5..682852783 100644 > --- a/lib/librte_ring/rte_ring_generic.h > +++ b/lib/librte_ring/rte_ring_generic.h > @@ -23,8 +23,7 @@ update_tail(struct rte_ring_headtail *ht, uint32_t > old_val, uint32_t new_val, > * we need to wait for them to complete > */ > if (!single) > - while (unlikely(ht->tail !=3D old_val)) > - rte_pause(); > + rte_wait_until_equal_relaxed_32(&ht->tail, old_val); >=20 > ht->tail =3D new_val; > } > -- > 2.17.1