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 6BF9DA0583; Fri, 20 Mar 2020 06:01:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 014722BB9; Fri, 20 Mar 2020 06:01:55 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2045.outbound.protection.outlook.com [40.107.20.45]) by dpdk.org (Postfix) with ESMTP id E3501F94 for ; Fri, 20 Mar 2020 06:01:53 +0100 (CET) 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=y2btUAWqB+n8o97tSs3YOZcpdmfDJAkM7IDpT5lm4tA=; b=5JCGPaiFaa/uONy7Y780hpRoA/Mgc+wVkEa1kZb0gJEiF+yHYKpfnpJ3LqNHQxCf/jyWGejUsRVaTPh6R8A3jLx2Bat+ZMLXkjjes1ilodmv38GZje4HdK91VcPZvjplmkdGeamj02EIVBYoLUh1dxrcCHdyQ0/A6ORtkMqvM1Y= Received: from AM6PR0502CA0061.eurprd05.prod.outlook.com (2603:10a6:20b:56::38) by AM6PR08MB4802.eurprd08.prod.outlook.com (2603:10a6:20b:cc::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.18; Fri, 20 Mar 2020 05:01:52 +0000 Received: from VE1EUR03FT019.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:56:cafe::e2) by AM6PR0502CA0061.outlook.office365.com (2603:10a6:20b:56::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19 via Frontend Transport; Fri, 20 Mar 2020 05:01:52 +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 VE1EUR03FT019.mail.protection.outlook.com (10.152.18.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.13 via Frontend Transport; Fri, 20 Mar 2020 05:01:51 +0000 Received: ("Tessian outbound d57d25b72657:v48"); Fri, 20 Mar 2020 05:01:50 +0000 X-CR-MTA-TID: 64aa7808 Received: from e1d8d4f4a5a8.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8CEC58B7-7C4C-4D4E-9405-FD7954615B65.1; Fri, 20 Mar 2020 05:01:45 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e1d8d4f4a5a8.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 20 Mar 2020 05:01:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JIhWz54EITlYilbZiydqLXk1F9WU5uDGNOonxAA2YAAKa62vJCv+ab/uGHIdN+V7Lilsz64BqrPFUSGpy3JTWJbywpoYoVHACcVOVRYtEZpuJXcvoT9fgu4rMHKukb1fkI4yyvPYVT+0iOQClTwX/SD5ktsiSEWvSUB1aqy94kXcRNFwx/xCU43NQCnQXQEyIsiNZCYNKAcOIIGVRAt/UsXwzZifEBz7zAtDO8JRwNUJH8Rj6yESWGEomlLzdP5Q4909tzJZQIhI90VHgcMXScpYW/l6mTiPDr4W4SG4CcJgkbsQis52kQd12Od7mPkx2r27iP3OQSorTPWaKzBHyQ== 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=y2btUAWqB+n8o97tSs3YOZcpdmfDJAkM7IDpT5lm4tA=; b=ZFZHipSkhPwaoX+EXwoEUpMfezFLosbFQWTMOMs+rRvA1Cbex9lu58oeOv90e0l8lPMOeCOHTXzqKTxcElN8hxBD4Q0dgMSLdwolIwZHU6R9wQXBdn+dZwQroQrEZ8h3lhYrn6zkv+KjvYsGL9mo0RjVz58fZgzSMvybSzCV+/hfGXZq549TSla3SMK2oPvV6UoubUpa6oD846r793i+k5bV0LRzK8cF6Z7NxaXGyOyIWc2gDnxA970LXJup8V4G+g8Qr7396SRArZ07LAnwEo5FVAyoliupFlEsbVxXsr2CVS223Hk/2A5YOaG+tsLyWHVonzdH4RnLAC7a6H3cfQ== 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=y2btUAWqB+n8o97tSs3YOZcpdmfDJAkM7IDpT5lm4tA=; b=5JCGPaiFaa/uONy7Y780hpRoA/Mgc+wVkEa1kZb0gJEiF+yHYKpfnpJ3LqNHQxCf/jyWGejUsRVaTPh6R8A3jLx2Bat+ZMLXkjjes1ilodmv38GZje4HdK91VcPZvjplmkdGeamj02EIVBYoLUh1dxrcCHdyQ0/A6ORtkMqvM1Y= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.27) by VE1PR08MB4720.eurprd08.prod.outlook.com (10.255.115.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.18; Fri, 20 Mar 2020 05:01:44 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::2573:103b:ed96:90bd]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::2573:103b:ed96:90bd%6]) with mapi id 15.20.2835.017; Fri, 20 Mar 2020 05:01:43 +0000 From: Honnappa Nagarahalli To: "thomas@monjalon.net" , Phil Yang , "Van Haaren, Harry" CC: "Ananyev, Konstantin" , "stephen@networkplumber.org" , "maxime.coquelin@redhat.com" , "dev@dpdk.org" , "david.marchand@redhat.com" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , Gavin Hu , Ruifeng Wang , Joyce Kong , nd , Honnappa Nagarahalli , nd Thread-Topic: [PATCH v3 00/12] generic rte atomic APIs deprecate proposal Thread-Index: AQHV+/n7P6oepoZnDEWF5L0GAIIkk6hOY32AgAAUAYCAAndHYA== Date: Fri, 20 Mar 2020 05:01:43 +0000 Message-ID: References: <1583999071-22872-1-git-send-email-phil.yang@arm.com> <1584407863-774-1-git-send-email-phil.yang@arm.com> <2682224.FA0FI3ke8A@xps> In-Reply-To: <2682224.FA0FI3ke8A@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 3a3408b9-4bc0-4ae6-b655-d98bee566144.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: 7ec2ae14-a565-480b-a751-08d7cc8bcd71 x-ms-traffictypediagnostic: VE1PR08MB4720:|VE1PR08MB4720:|AM6PR08MB4802: 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:10000;OLM:10000; x-forefront-prvs: 03484C0ABF X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(136003)(366004)(376002)(346002)(39860400002)(396003)(199004)(71200400001)(52536014)(64756008)(2906002)(5660300002)(66946007)(76116006)(66556008)(66446008)(9686003)(66476007)(86362001)(33656002)(7696005)(6506007)(4326008)(316002)(110136005)(478600001)(54906003)(55016002)(8676002)(26005)(186003)(81156014)(8936002)(81166006)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4720; H:VE1PR08MB5149.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; 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: fLUQxetviObFmidy7W7IQHVVSEulo5X2DAX/8+KjMX3XCXxTmjJMkYUQ0MXLnC2M5DC3jtzEBCdMN2E/1D69R12alPy9R/g93emTseO+rs65FaFqKoVniXY2P5tQO2DZ0raPrCOstyIErDDAouckbVu0454QfxJhRefo6rC6W0PWydmYoGmHGdyu4ozP96Pta5pX/amJu+UE2OKosK1JaNKItABzyKwplrvUbXQ0ccBx/ZuOn49BFCJH8vMIA7rOuTdO8oxt8YDrsypcbefawaXt0DkcDb/cg/UrKUnwIABgH2FpIjOcpFJzIOXwUt/uH8Y0M8PLRE0F5fTadBTzUdBJTN7CT5zKTVYr4rzGbLz4IcQNoyjl5jVfp4+9K3p6HkNX/fgEnm2KfFmvybjmHAlUw7RnnbEZLR07B3MsykfR9IMH7g1HpcU6vMMxdOBQ8MZBUGNVB3G4Wp+4AJIHH4Y/Vex2Cy/nXwQISmP940bEK0+EOzJ/AlCNYCmCWa4v x-ms-exchange-antispam-messagedata: FkAP6fuAT9pO51yC7dUdUAdttNcIWTXFhyxj6OBE/BHsR7RLALgNrcff3m2DfQPKZRW7d0iWUaimKo4dnKz82fTjfahbQVP4e94zk6/H9wuxml9m3jbdKFfFPxjNzKus4wZIWlLqIr1EaMGZbdDOlQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4720 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT019.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)(396003)(39860400002)(346002)(376002)(136003)(199004)(46966005)(2906002)(52536014)(86362001)(5660300002)(54906003)(70206006)(70586007)(336012)(47076004)(26005)(186003)(316002)(356004)(110136005)(7696005)(6506007)(8676002)(81166006)(81156014)(8936002)(26826003)(478600001)(4326008)(9686003)(36906005)(55016002)(33656002)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR08MB4802; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: d61ec60e-0099-4ea1-4fa9-08d7cc8bc8eb X-Forefront-PRVS: 03484C0ABF X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WfXq6IPROmHvqIZCv8pErDtEDrfUB4pXpSnGIaMN5r9ovBfTIqNmzKpL31dLa7VzDYXnjGq9DU9S4YRShjOAcei40bp8XZfi/8Z3bVHCO0n0ergbTSIqj2S7JOJDYK1Q7vxIXn0h21nbKfwNdGIrrMZHd83o8WtuoLDdiS5KOcZHJpH/yHfCLmbQh1+08TRpevGgkVkN/Aw4yClY9k8wXAVS2eU0dJK2Y6i9u9VMPJxx6iw9AyJl662h1joe6ciYn/tOWv80pOetnGNo2xaJymsjBjTxNwduHSKREf+SXaJUVr10xUXT6dFQ/HfuJMR3Vsc8l1c4UtFLQT73CkPZZhKtJKk+nKH3htterqDIyrLmfbtairl5nEIMTO9prIOtLexy+da+tUgPAHnUneTc/R4rgzUbpra1XZ0qpGniADDoh2P3FQgsbjanyhMgG40F1ucLbQ4Gus49X8FQCgWDRS4o4eq6IStohhFXYxRzk/73iODvnqp61GB5IBK44q1pCrR4fENJHIaoauqkxNGFyxEQrNcrjs6UJwh5/e7TBTM= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2020 05:01:51.4041 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7ec2ae14-a565-480b-a751-08d7cc8bcd71 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: AM6PR08MB4802 Subject: Re: [dpdk-dev] [PATCH v3 00/12] generic rte atomic APIs deprecate proposal 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" > Subject: Re: [PATCH v3 00/12] generic rte atomic APIs deprecate proposal >=20 > 18/03/2020 15:01, Van Haaren, Harry: > > Hi Phil & Honnappa, > > > > From: Phil Yang > > > > > > DPDK provides generic rte_atomic APIs to do several atomic operations= . > > > These APIs are using the deprecated __sync built-ins and enforce > > > full memory barriers on aarch64. However, full barriers are not > > > necessary in many use cases. In order to address such use cases, C > > > language offers > > > C11 atomic APIs. The C11 atomic APIs provide finer memory barrier > > > control by making use of the memory ordering parameter provided by th= e > user. > > > Various patches submitted in the past [2] and the patches in this > > > series indicate significant performance gains on multiple aarch64 > > > CPUs and no performance loss on x86. > > > > > > But the existing rte_atomic API implementations cannot be changed as > > > the APIs do not take the memory ordering parameter. The only choice > > > available is replacing the usage of the rte_atomic APIs with C11 > > > atomic APIs. In order to make this change, the following steps are > proposed: > > > > > > [1] deprecate rte_atomic APIs so that future patches do not use > > > rte_atomic APIs (a script is added to flag the usages). > > > [2] refactor the code that uses rte_atomic APIs to use c11 atomic API= s. > > > > On [1] above, I feel deprecating DPDKs atomic functions and failing > > checkpatch is a bit sudden. Perhaps noting that in a future release > > (20.11?) DPDK will move to a > > C11 based atomics model is a more gradual step to achieving the goal, > > and at that point add a checkpatch warning for additions of rte_atomic*= ? > > > > More on [2] in context below. > > > > The above is my point-of-view, of course I'd like more people from the > > DPDK community to provide their input too. > > > > > > > This patchset contains: > > > 1) the checkpatch script changes to flag rte_atomic API usage in patc= hes. > > > 2) changes to programmer guide describing writing efficient code for > aarch64. > > > 3) changes to various libraries to make use of c11 atomic APIs. > > > > > > We are planning to replicate this idea across all the other > > > libraries, drivers, examples, test applications. In the next phase, > > > we will add changes to the mbuf, the EAL interrupts and the event tim= er > adapter libraries. > > > > About ~6/12 patches of this C11 set are targeting the Service Cores > > area of DPDK. I have some concerns over increased complexity of C11 > implementation vs the (already complex) rte_atomic implementation today. > > I see other patchsets enabling C11 across other DPDK components, so > > maybe we should also discuss C11 enabling in a wider context that just > service cores? > > > > I don't think it fair to expect all developers to be well versed in > > C11 atomic semantics like understanding the complex interactions betwee= n > the various C11 RELEASE, AQUIRE barriers requires. > > > > As maintainer of Service Cores I'm hesitant to accept the large-scale > > refactor of atomic-implementation, as it could lead to racey bugs that > > are likely extremely difficult to track down. (The recent race-on-exit = has > proven the difficulty in reproducing, and that's with an atomics model I'= m > quite familiar with). > > > > Let me be very clear: I don't wish to block a C11 atomic > > implementation, but I'd like to discuss how we (DPDK community) can > > best port-to and maintain a complex multi-threaded service library with > best-in-class performance for the workload. > > > > To put some discussions/solutions on the table: > > - Shared Maintainership of a component? > > Split in functionality and C11 atomics implementation > > Obviously there would be collaboration required in such a case. > > - Maybe shared maintainership is too much? > > A gentlemans/womans agreement of "helping out" with C11 atomics > debug is enough? > > > > > > Hope my concerns are understandable, and of course input/feedback > > welcomed! -Harry >=20 > Thanks for raising the issue Harry. >=20 > I think we should have at least two official maintainers for C11 atomics = in > general. Sure, I can volunteer. > C11 conversion is a progressive effort being done, and should be merged s= tep > by step. Agree, the changes need to be understood, it is not a search and replace ef= fort. The changes will come-in in stages unless others join the effort. The concern I have is about the new patches that get added. I think we need= to stop the new patches from using rte_atomic APIs, otherwise we might be = making these changes forever. > If C11 maintainers fail to fix some issues on time, then we can hold the = effort. > Does it make sense? I am fine with this approach. But, I think we need to have a deadline in mi= nd to complete the work. >=20