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 78617A00C2; Fri, 24 Apr 2020 15:24:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DE0D21C2F9; Fri, 24 Apr 2020 15:24:38 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 4A57B1C22D for ; Fri, 24 Apr 2020 15:24:37 +0200 (CEST) IronPort-SDR: aJOaqbUMvXT1vc0La0nQpHDG8sVMOSa3DIBbscPJNenha9lrFrTAUMqw/YQwvce0bzoFoslGhH AjcgwlcUvLNQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2020 06:24:36 -0700 IronPort-SDR: 8dfn8/SASV8XqvkvOh8B1iCbZ/nUyqyC6brm889NXu4X6zY7YhBtOrP4Wrmj43+aiXphwFaoLa XNe8+IILCP8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,311,1583222400"; d="scan'208";a="280796396" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 24 Apr 2020 06:24:35 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 24 Apr 2020 06:24:36 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.177) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 24 Apr 2020 06:23:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ni6pdL14xdlhAFxcTZP4kVvucLgJyecAp+twXFBgmRGe0UYs4bR8E3F5LRAi63MyulmMnrPkH1e3jY6gJL828FiR2e8l2A1A43PhHYazHtajO0STRgCbDzcbKX063BCwMQr+HEcA4vJKCaf00Qf4/WerhVCmx0p+xb9ssNzQWdaiuCrU1ESTh0c42pUWTXB8jL/c2X8a6jOg4F0H/6+j9bx+7prUAHtV1KOS0s2hpLBq+qCeo/TJ3/JsVH2DRIJmwInWlTxB681RVe3FAPZVKL3BBTuN8vU2rDVoPi/hPP5TABSEijZ0MJLSd+PqNEJ9RV0utqoQEwSzNmc4c9gtHw== 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=HrMNe2UTZxgFiN/MxDcFtVxLxCbR5PjNa+oU5SnLtRM=; b=lxiR24HoqTFHI6uDjn6NJxylBz1eGqdFyGL6omyB0ZKaEMXVZD26I6G7YKl1KfMFsagMU+K2adXjce3ncB3q2pgyrAvrxf0oa9bEU3+/IYLG40Z6sBZbXUnFdyzkeQSDzuPaiSwHluIPt9iAgP4+ckc1/N9kQH7U+A5cU8667qQ6eMOS37LcQp7DczQUb6BNV1O0EoKtDEQR4lCacu3FzFRCWZXOnrZf0KmrHjwsq5xyyvQQVEnUeB1NmSb7jucy2plVPL8Enl/0cUup9zKYGyKwqOxuFGbKlf1ubZ2gKeQ6IDyUwtL5pJIEkUffumUmTCjMEKFihPA22MUY62QzVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HrMNe2UTZxgFiN/MxDcFtVxLxCbR5PjNa+oU5SnLtRM=; b=iKQIEQxvVIABYEEEtZASBnnfLPBPQ6tKKV1LOrY90tgOtDqO6kYVYDp/CDdo4V3RIaR5WLVlQwmhgctFuz6SLc0GciOjoeUhyRQkyQ2cBd00M+MbtBsh8Eyfjhrlx+HDmSYU+6PA63dRMyLLYwTF/l+QjtKaDWKZDKaDtur2GMY= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB2710.namprd11.prod.outlook.com (2603:10b6:a02:c7::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.27; Fri, 24 Apr 2020 13:23:56 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4%6]) with mapi id 15.20.2937.020; Fri, 24 Apr 2020 13:23:56 +0000 From: "Ananyev, Konstantin" To: Gavin Hu , "dev@dpdk.org" CC: "nd@arm.com" , "david.marchand@redhat.com" , "thomas@monjalon.net" , "jerinj@marvell.com" , "Honnappa.Nagarahalli@arm.com" , "Ruifeng.Wang@arm.com" , "Phil.Yang@arm.com" , "Joyce.Kong@arm.com" Thread-Topic: [dpdk-dev] [PATCH v1 2/2] ring: use wfe to wait for ring tail update on aarch64 Thread-Index: AQHWGgc94VI6YwbQK0mCh7y2Zu06lqiIQmiQ Date: Fri, 24 Apr 2020 13:23:55 +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-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=konstantin.ananyev@intel.com; x-originating-ip: [192.198.151.170] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c41a7557-9e1a-4f7f-a1fc-08d7e852bd80 x-ms-traffictypediagnostic: BYAPR11MB2710: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-forefront-prvs: 03838E948C x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(346002)(366004)(396003)(376002)(39860400002)(136003)(8936002)(71200400001)(186003)(66476007)(64756008)(55016002)(33656002)(66446008)(316002)(86362001)(66556008)(76116006)(81156014)(66946007)(5660300002)(7416002)(478600001)(52536014)(6506007)(110136005)(2906002)(15650500001)(4326008)(9686003)(54906003)(7696005)(26005); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dO/GPPSzv9dMZX5Glio7ZGeoyRHuDVPHczMMPEp/3GI1hTU7pTtJ2v/lUN1b/P2Wk3AHFk4ny6QnPjCp+jI3fLOT6dKmGyZ/+Hy15tc2ijW75qZhamgFN05uOEg0Jv3tpdUwGVAb+yjEhktB+sbDsk8AD4hW+K7J5av7dlpl3L+hGBs/xWzyeEWvxuu7Wom4ZiyPKa1qG//9c4k/XKTY2yBXM9GrKBfyox1EbF4O1InuFSjaZnNxPn/93Maei1uqQbpP++UyA490W5cmfe3ni8GcouTfuo1fLibEOVyjkMuvw/K/het4QNgdFQHqDS5rs+EjtB4jHqlGTvyxUasOpcDMrxpQfM1x8dybrix4/pTV/wJwLYTDvv6yIQjd16yh8bwXKShg3S/wlMMZd0d+49Rk4jAylxQaeWIF38rbEFZaNSZSwrMROLTSGZ4j0uko x-ms-exchange-antispam-messagedata: EMoEXps4J7hwIhkd2YXhkzTv5LBtf81x5AAOJOoITX+Lf6hKYD1vS7HJNfP1OliC+IGSvH9yYGt0m7UkS2bxrg/8V1joXT/vcD+iH2LyaWZNKbs+t7URnAsNcqHUsRarxGdBFrQZfWztnwa2zEPyiQ== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c41a7557-9e1a-4f7f-a1fc-08d7e852bd80 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Apr 2020 13:23:55.9311 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: QtU1k6ujY/8iYUKcXB9IygsPnO4j/FDvcOFR6abs+YD/qUIoFXt8/a1s5+FeLv64jSYddOV0RgokSBdiWqYrMDJxQXgymUKdMn2RKHByK7Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2710 X-OriginatorOrg: intel.com 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" >=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_rin= g_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_rin= g_generic.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); ./lib/librte_ring/rte_ring_generic.h:26:3: error: implicit declaration of f= unction 'rte_wait_until_equal_relaxed_32'; did you mean 'rte_wait_until_equ= al_32'? [-Werror=3Dimplicit-function-declaration] rte_wait_until_equal_relaxed_32(&ht->tail, old_val); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ BTW, after patch #1 compilation fails also: ../lib/librte_eal/x86/include/rte_spinlock.h:125:24: error: pointer targets= in passing argument 1 of 'rte_try_tm' differ in signedness [-Werror=3Dpoin= ter-sign] if (likely(rte_try_tm(&sl->locked))) ^ >=20 > ht->tail =3D new_val; > } > -- > 2.17.1