From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A68DDA034F; Fri, 7 May 2021 12:19:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F1E84013F; Fri, 7 May 2021 12:19:02 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2042.outbound.protection.outlook.com [40.107.20.42]) by mails.dpdk.org (Postfix) with ESMTP id A18B940040 for ; Fri, 7 May 2021 12:19:00 +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=2n2mpzMMMhH03kzXZeVAPUb1Q89Tl6yHdpiW5jHacbo=; b=SdU+MJC8XP79Th2cKbJp6rfF9SNZqRtX0ZSioP531nUFd7o5Fm6SkwhK9YcmXr1yfy6rRPwIc/H3F1jkbM3BXtyJl+f9lSHYGUSiNAhSXVPvlazhC63p+1O6Tn4seOMDgMcIiT2T/sD4bF0K3RQD+YqK8eC47sNWRjo+kOeh7GU= Received: from DB3PR06CA0008.eurprd06.prod.outlook.com (2603:10a6:8:1::21) by AS8PR08MB5976.eurprd08.prod.outlook.com (2603:10a6:20b:299::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.27; Fri, 7 May 2021 10:18:59 +0000 Received: from DB5EUR03FT034.eop-EUR03.prod.protection.outlook.com (2603:10a6:8:1:cafe::5) by DB3PR06CA0008.outlook.office365.com (2603:10a6:8:1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24 via Frontend Transport; Fri, 7 May 2021 10:18:59 +0000 X-MS-Exchange-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=pass 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 DB5EUR03FT034.mail.protection.outlook.com (10.152.20.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Fri, 7 May 2021 10:18:59 +0000 Received: ("Tessian outbound 13cdc29c30b8:v91"); Fri, 07 May 2021 10:18:59 +0000 X-CR-MTA-TID: 64aa7808 Received: from 96b866357755.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2AF1E189-2322-4403-872B-2DC05440F446.1; Fri, 07 May 2021 10:18:53 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 96b866357755.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 07 May 2021 10:18:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T3byYBIcrPcxp7siM8zub6JaHxnjhiNtzPBGYhSPq0CG9ZzjM0lk9y3wHBkkU5ZM2WbkpEGpny+cdsM0amYYZ32SbmJIm3PR+C4sy5VENkoWjWf/r58TYcn4AlDt9rLBFe7fW+ScEMQG47MydlQziGDDNelYY0+l00Y33XU29EHXrHw7Rmh4q0SaV3vGEV3gVEsWgyvUKPaDycWBETwvYZVQHL0MCHXYjx8BWtUtN75Fjiw1gCbubo3vYn17k5k4R2NTbCz3zYKjLB6/UP0Nmcz1cceuhPwGS6iO1vDhTQ8HqaypeABgXciymnS2sqk5nxmfBl2Ywu8AO80cy2rvQA== 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=2n2mpzMMMhH03kzXZeVAPUb1Q89Tl6yHdpiW5jHacbo=; b=Wn9kGhVjwn77+q/Q6R1OnSzwZ9z7YI3cpDgi9l0SXaQfwNnq4DaJpbeoYAn/m+K2xu0tyVgYMDUTH+gn/7v33lbJ5/fEZrztYeCK5EIZTGnvRsqg1GyjTcaIT0smCmZ+CjZNu6qF77H+pAcjqaLnQ+h29/r3WwqZh1foACQzKTqWgVAW8XhijDzBYYGuuQADPk0v1J6G3EwPSxNzmCQBk8p0vHQLL4Z+xPATjMAx8dyZzZvN1dvNkmDmXZ7aMtOofldtnTsQL6nGPxwGUOyf6JYwtYpqdG4MXQ7E8q3o0dCoJpqbyW/5elHN5e+H/7AY+sq26mDaYwSJEywI/eynag== 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=2n2mpzMMMhH03kzXZeVAPUb1Q89Tl6yHdpiW5jHacbo=; b=SdU+MJC8XP79Th2cKbJp6rfF9SNZqRtX0ZSioP531nUFd7o5Fm6SkwhK9YcmXr1yfy6rRPwIc/H3F1jkbM3BXtyJl+f9lSHYGUSiNAhSXVPvlazhC63p+1O6Tn4seOMDgMcIiT2T/sD4bF0K3RQD+YqK8eC47sNWRjo+kOeh7GU= Received: from AM5PR0802MB2465.eurprd08.prod.outlook.com (2603:10a6:203:9f::22) by AS8PR08MB6326.eurprd08.prod.outlook.com (2603:10a6:20b:335::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.26; Fri, 7 May 2021 10:18:52 +0000 Received: from AM5PR0802MB2465.eurprd08.prod.outlook.com ([fe80::e890:2ff8:8cdf:83b2]) by AM5PR0802MB2465.eurprd08.prod.outlook.com ([fe80::e890:2ff8:8cdf:83b2%4]) with mapi id 15.20.4108.028; Fri, 7 May 2021 10:18:52 +0000 From: Ruifeng Wang To: Bruce Richardson , Honnappa Nagarahalli CC: "thomas@monjalon.net" , David Marchand , dev , "jerinj@marvell.com" , nd , nd Thread-Topic: Use WFE for spinlock and ring Thread-Index: AQHXOZfiEaONiOZqSEmnDJAtoLql+6rJkOEAgAAZKsCAACHSgIABvJWwgAAaoYCAASzhAIAASd8AgAAKioCACqN4gA== Date: Fri, 7 May 2021 10:18:52 +0000 Message-ID: References: <20200424070741.16619-1-gavin.hu@arm.com> <2370044.79WzprfWfc@thomas> <20248566.ii5BvqWlRQ@thomas> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 9EDBBF894024FE4B8F7A13F978B7029F.0 x-checkrecipientchecked: true Authentication-Results-Original: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [203.126.0.112] x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 8bd85931-a75a-4d2b-4520-08d91141875f x-ms-traffictypediagnostic: AS8PR08MB6326:|AS8PR08MB5976: 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:4941;OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: cS+Aj8QwF5v53Iy91AeSvK462rzK9VO+EpTIcjkTKapN6x6rvTxH6xoj2X96+C4vTLLoTVwDtT3ttGf3uBO3wRTsU6FAeUdBJwzuBK+19oXwYmGgddRoH+5Qva3++leWd0GiJWP9sjuoBTfe1PyQR6SIB5TVlgKnctm1LvUJrMyRhfytvnOhA0kaLTg33xdjxFQklPdtM3LlGJQ9/A0AAyiidWAnGlfZjIvssF4EF6drKJ4+hecenar8Mn/w+Dd6ZMAGNH0zIrHgQK1Gg4RKiwoT2dzfBeNHlehhxS/aB0G3sHUXmT/yHnp/k5fqRoSlT5UqKvQjdGeu6cV+AdJUwcDKzDovWEKAOvmB/8iBM55cYIeR7PQiHPKUd7Mn88yJ0eqTkPJ4qK19L7xZ3tmo3jXawmwLE5saQz37BVoHHfJCe7NRh3klqq6QGtOfbUqR76t88zXvHz3ut8skRirVguw6MKkFwk1uhXLbOd5zgCLAQ5wlTiR2TRY0aoz+r/+NEOV4VhxE4wyoLF8ftK6TAnwEdQNrDFbKfB5EnPCaKtdxomjFTsKiTEVlSpt5KeHY2L3jAovF2LA5cWsp8AEyfVZYwucd/6yYsNhMCbOHrxIuz/75mZAtu24wIBwjZAI4KJptlAnqBe7UGgxGhcv3yw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM5PR0802MB2465.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(136003)(396003)(346002)(39850400004)(2906002)(53546011)(71200400001)(478600001)(5660300002)(76116006)(83380400001)(110136005)(54906003)(186003)(122000001)(26005)(6636002)(38100700002)(6506007)(52536014)(66556008)(316002)(33656002)(66446008)(64756008)(9686003)(86362001)(8676002)(66476007)(66946007)(8936002)(4326008)(7696005)(55016002)(21314003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?PFunXvo9Vmh+NGdcSa9iaVT5efH2vMjBtzKVV+PuxjwwMhKw5WedH4m9bzFZ?= =?us-ascii?Q?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?= =?us-ascii?Q?fA803tH9oyH8EY4sok9/zx1OHboTv8Rx7Sn5JhqYZZRtrBf/kPk5n3mtDj3p?= =?us-ascii?Q?UoUjJ6OEyxFlpRDUMkXuNRQMq8kxB/J5iBoepQmlXLe2N8rHdF8GS32XZKff?= =?us-ascii?Q?a43yF6QhjpS8+nZB8+SSAEdC5X7qrQFF/yENHFTIEXj7XfAI2yOcOocP2dW9?= =?us-ascii?Q?rrid9vthMZBdcuIO9dx1D3n7rv7MfFPgnjj9n6Yi7n+K19brekb0FzDuv6PU?= =?us-ascii?Q?exelB5QBbJzzUvjYKMYwjA9XeepfA3UuRj5jGo5n1m/lOtiLq8w5AJt9Dee8?= =?us-ascii?Q?4+rB5lHhqbjM71/uecOLr4SCK8ThhhfXKOu3y5dQYTuy0/GUQtddNcwRfHce?= =?us-ascii?Q?Whb5GuvYIaevpeFGMuxnN1Sa?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6326 Original-Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT034.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 6d56d674-77bc-42b7-8d9e-08d91141834f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KPxq0odx5yJOC978/uSUXPhymL52Ro4+lcDL09/HmVCvU+dyvLHdfxJWQxbXVpgOyYscab/Y3NtYVDYC+mLxGyrzblms2ebxjEt+4giU0MAZu1rzY00WkP/JG4f1gvMaCzUdymU6aE11wm1dOqQ4LdIWihkvmQqrHTmsKxpB4zw/LeRxIEYSbS1+/0lMT12BFKwiu8nLtktZcjkAw65NG5jiCzB0zWSjcO2oSJfKhxz4ncebAp6Fv3SkbhKhsYm2QhQcp6fIfCmD6XQnsr4UjlZpGtgNzMS/1qwwdApD9NBihg6cJT1+Vk6nf0aNUyCi0Dn1rx8WYYtT0YhbNMVTje0at6B5PuSufQ2YsCrYzsmUZYpbBN30azsfSGQnHurYDiDMUnOkWyw8xBRnaREBLk4EXNjPwAPMprQyLL8DHJ6ghX3p5ukWxIdRqqdbdsy8+eflON2uPghBxpy5pINxIwNVtOln9UR7ifkHZ5ktm3SDWSk90aCyL3aaHrPumzXcbLMK9j9NLP9W2/njwGTyaK+M9iIfyte+YG4d+0Xbf8NJYOeeMbdpQQKrwHfGmuMOUkl1kCj62J3TcG2sTi3ofwbob/qEgRKvWPhBchkCajVp6uE6BD7upl4PxocdpoidsxcU5FEZ8d3piyawj4s+rHaUr1ZqJK51RU2H+tKIY3lj6BWeC0MOnaDLZb5oRtxE 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; SFS:(4636009)(39850400004)(396003)(136003)(376002)(346002)(46966006)(36840700001)(26005)(36860700001)(4326008)(86362001)(2906002)(6636002)(8936002)(8676002)(47076005)(6506007)(7696005)(186003)(9686003)(478600001)(336012)(55016002)(110136005)(5660300002)(83380400001)(81166007)(356005)(33656002)(70586007)(53546011)(52536014)(82740400003)(82310400003)(54906003)(70206006)(316002)(21314003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2021 10:18:59.1280 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8bd85931-a75a-4d2b-4520-08d91141875f 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-AuthSource: DB5EUR03FT034.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB5976 Subject: Re: [dpdk-dev] Use WFE for spinlock and ring X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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: Bruce Richardson > Sent: Friday, April 30, 2021 10:19 PM > To: Honnappa Nagarahalli > Cc: thomas@monjalon.net; Ruifeng Wang ; David > Marchand ; dev ; > jerinj@marvell.com; nd > Subject: Re: Use WFE for spinlock and ring >=20 > On Fri, Apr 30, 2021 at 01:41:22PM +0000, Honnappa Nagarahalli wrote: > > > > > > > > > > > > > > > > > > > > > > The rte_wait_until_equal_xxx APIs abstract the > > > > > > > > > functionality of 'polling for a memory location to > > > > > > > > > become equal to a given > > > value'[1]. > > > > > > > > > > > > > > > > > > Use the API for the rte spinlock and ring implementations= . > > > > > > > > > With the wait until equal APIs being stable, changes > > > > > > > > > will not impact > > > ABI. > > > > > > > > > > > > > > > > Afaics, there is no ARM target with WFE enabled and we > > > > > > > > lost ability to enable WFE support with removal of the > > > > > > > > make build > > > system. > > > > > > > > > > > > > > WFE can be enabled with direct meson file change. > > > > > > > WFE is not intended to be enabled by default. It can be > > > > > > > enabled based on benchmarking result on hardware. > > > > > > > > > > > > > > > > $ git grep RTE_ARM_USE_WFE > > > > > > > > config/arm/meson.build: ['RTE_ARM_USE_WFE', false], > > > > > > > > lib/eal/arm/include/rte_pause_64.h:#ifdef RTE_ARM_USE_WFE > > > > > > > > > > > > > > > > How did you enable WFE to test this series? > > > > > > > > > > > > > > I modified meson file to test. > > > > > > > Tests were also done with WFE disabled to make sure no > > > > > > > degradation with > > > > > > generic implementation. > > > > > > > > > > > > I don't understand the usage. > > > > > > Which platform should use it? > > > > > > > > > > Platforms that implement WFE semantic (e.g. N1) can use. > > > > > The user can enable this feature for power efficiency purpose. > > > > > But there is something to note as described in commit message > > > > > 1be7855d77 > > > when the API was introduced. > > > > > > > > > > > Should it be a compile-time option? > > > > > > > > > > Yes, it should be a compile-time option. > > > > > It can be configured via c_args meson option? > > > > > > > > +Cc Bruce for discussing how to enable such feature. > > > > > > > > The problem with c_args is that the application has no way to know. > > > > > > > Agree about c_args not being a great choice. Why does this need to > > > be a compile-time option? Can runtime support not be detected in > > > some manner? > > The problem is inconsistency in performance on different Arm platforms. > We had decided that each platform needs to enable it after some testing. >=20 > Then it sounds like it does indeed need to be a build option. Does it nee= d to > be added to the meson_options.txt, or can it just be specified in cross-f= iles > and optionally via c_args? Add it to the meson_options.txt is good as the option will be clearly expos= ed. My concern is more options (e.g. RTE_ARCH_ARM64_MEMCPY) need to be added in= . Will the options bloat meson_options.txt?