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 EFB5BA0487 for ; Mon, 1 Jul 2019 11:12:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 92B752C38; Mon, 1 Jul 2019 11:12:49 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20051.outbound.protection.outlook.com [40.107.2.51]) by dpdk.org (Postfix) with ESMTP id 1E43C2BC8 for ; Mon, 1 Jul 2019 11:12:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=testarcselector01; d=microsoft.com; cv=none; b=bqTZxAlkDL0e3Wt1inAOTIpUsuwBZDx6Y5GuqbW4MKx6l0vkxYrPblbjLIWThJf0wdNNDiqJjUMEQul8e4314dEaEWKW/X08q+8Rtf0Ch0uZmtpdIoeasPYnaawpzZ63HFmF6XtWtHzp9rxV8V/4skTmBW9VkBfInpqaiyzY8Xw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=testarcselector01; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pCPH4/BCgZ7BuASV8kNWqnxfK0KuGQJCZY0prfC4kuc=; b=irW91CfRkWx9lrFZyDbqlNpImq9G3gYKwjDn9S7MF51Ymy8KEGu7YLxrdlBG/X3B9jQSSwxyq43KKOlP619LujaAz0cfMWBpRInjSGMaZAuPA6xyu5+e4SIAyzk2Jek7SL+c4KcAJ+MX8R1+cBO/hzyCoeRFFkhRct/KHe+hgMg= ARC-Authentication-Results: i=1; test.office365.com 1;spf=none;dmarc=none;dkim=none;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=pCPH4/BCgZ7BuASV8kNWqnxfK0KuGQJCZY0prfC4kuc=; b=7sOpsmm6MxAExlOjbXK5ACdmnCdy1B32UrmgpYs4xna8wQOj7XqL5DxlVaItwSrVmxWwzA+c8Q4z3PishJFjHRaDgDG1hkxsnT1Zgh/C94AlxBc1wEDmNN2mcwA3LaPS+2UiAPirzkom80ntM11bqzx/pRoYhCzEnzzG/JS9zDI= Received: from VI1PR08MB3167.eurprd08.prod.outlook.com (52.133.15.142) by VI1PR08MB2781.eurprd08.prod.outlook.com (10.170.236.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Mon, 1 Jul 2019 09:12:47 +0000 Received: from VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::f1a9:e870:d495:8d31]) by VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::f1a9:e870:d495:8d31%5]) with mapi id 15.20.2032.019; Mon, 1 Jul 2019 09:12:47 +0000 From: "Gavin Hu (Arm Technology China)" To: Stephen Hemminger CC: "dev@dpdk.org" , "thomas@monjalon.net" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "bruce.richardson@intel.com" , "chaozhu@linux.vnet.ibm.com" , Honnappa Nagarahalli , nd Thread-Topic: [dpdk-dev] [RFC 0/5] use WFE for locks and ring on aarch64 Thread-Index: AQHVL1/necIdoVX7bUye4x3mxe47Aaa0pmsAgADS1UA= Date: Mon, 1 Jul 2019 09:12:47 +0000 Message-ID: References: <1561911676-37718-1-git-send-email-gavin.hu@arm.com> <20190630132958.6d2250da@hermes.lan> In-Reply-To: <20190630132958.6d2250da@hermes.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 183c812a-73f2-47ff-be1e-1cbab80f71c4.0 x-checkrecipientchecked: true authentication-results: 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: a699d049-ec11-49d0-32bf-08d6fe0448db x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VI1PR08MB2781; x-ms-traffictypediagnostic: VI1PR08MB2781: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 00851CA28B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(396003)(136003)(366004)(39860400002)(376002)(199004)(13464003)(189003)(72206003)(305945005)(55236004)(7736002)(6916009)(7696005)(26005)(25786009)(316002)(102836004)(476003)(486006)(8936002)(74316002)(6506007)(8676002)(54906003)(446003)(6246003)(76176011)(66066001)(11346002)(14454004)(6436002)(99286004)(76116006)(73956011)(478600001)(81166006)(71190400001)(229853002)(53936002)(66476007)(2906002)(5660300002)(256004)(9686003)(33656002)(14444005)(81156014)(52536014)(186003)(55016002)(71200400001)(68736007)(66446008)(3846002)(6116002)(53546011)(4326008)(66946007)(66556008)(64756008)(86362001)(21314003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB2781; H:VI1PR08MB3167.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: t2RWvGANLXRbLSYvWq2SrCf7BNN2UV2dKj9f5xQp3ET3Bif1NzzmplL2QdDelbo2oFbxLxyut1Fjy642E5KTGStAkqwMJcsea8IPpvmMls5HJHGTN1M3PV7zQLE3pvhhXtA+SBQ9/WcDLvsIxJUSlyGcWhSPUitULfGoL97W32IM3E7kvQgYnbtnHNZijP039RlpJziJf7HZfi/sftswezJMgVDCK4HqE3SCwOJlhtaSP3/1OBTPVwysEbn6GArQdZHQDSsWgNQDPItoqe8SRTtUTNaVtwb91hByyGsS+6NgQwz6PM/yoNgzxiLyz6Fi2ZhyIKndnuMP1s/+0Yjf21qJV6IwdjS8LyEgTFOOqnab9uZ9k2vLP9+q8h87oqaJf7Va5QvVubYed10vgVItR7r967KlArFK080Y9hPN9x8= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: a699d049-ec11-49d0-32bf-08d6fe0448db X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jul 2019 09:12:47.4073 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Gavin.Hu@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2781 Subject: Re: [dpdk-dev] [RFC 0/5] use WFE for locks and ring 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 Stephen, > -----Original Message----- > From: Stephen Hemminger > Sent: Monday, July 1, 2019 4:30 AM > To: Gavin Hu (Arm Technology China) > Cc: dev@dpdk.org; thomas@monjalon.net; jerinj@marvell.com; > hemant.agrawal@nxp.com; bruce.richardson@intel.com; > chaozhu@linux.vnet.ibm.com; Honnappa Nagarahalli > ; nd > Subject: Re: [dpdk-dev] [RFC 0/5] use WFE for locks and ring on aarch64 >=20 > On Mon, 1 Jul 2019 00:21:11 +0800 > Gavin Hu wrote: >=20 > > DPDK has multiple use cases where the core repeatedly polls a location = in > > memory. This polling results in many cache and memory transactions. > > > > Arm architecture provides WFE (Wait For Event) instruction, which allow= s > > the cpu core to enter a low power state until woken up by the update to= the > > memory location being polled. Thus reducing the cache and memory > > transactions. > > > > x86 has the PAUSE hint instruction to reduce such overhead. > > > > The rte_wait_until_equal_xxx APIs abstract the functionality of 'pollin= g > > for a memory location to become equal to a given value'. > > > > For non-Arm platforms, these APIs are just wrappers around do-while loo= p > > with rte_pause, so there are no performance differences. > > > > For Arm platforms, use of WFE can be configured using > CONFIG_RTE_USE_WFE > > option. It is disabled by default. > > > > Currently, use of WFE is supported only for aarch64 platforms. armv7 > > platforms do support the WFE instruction, but they require explicit wak= e up > > events(sev) and are less performannt. > > > > Testing shows that, performance varies across different platforms, with > > some showing degradation. > > > > CONFIG_RTE_USE_WFE should be enabled depending on the performance > on the > > target platforms. >=20 > How does this work if process is preempted? WFE won't prevent pre-emption from the kernel as that is down to a timer/re= -scheduling interrupt. Software using the WFE mechanism must tolerate spurious wake-up events, inc= luding timer/re-scheduling interrupts, so a re-check of the condition upon = exit of WFE is needed to be in place(this is already included in the patch)