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 4BD62A0524; Mon, 24 Feb 2020 21:53:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0CA5C2C39; Mon, 24 Feb 2020 21:53:05 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2064.outbound.protection.outlook.com [40.107.21.64]) by dpdk.org (Postfix) with ESMTP id 2A5AE1DBF for ; Mon, 24 Feb 2020 21:53:03 +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=WHLcFRVCu39a326KVHWrMGyJ3VWDUJfkAZtcFu64CKc=; b=5WYEdT7ZumpTE2hrB92rX3b267PlI3sjdsl2SI12XU3RQEVZYyH1SXOFzIzkk05c1YjT753kZtoMkKtgq3rOgspEB7dJD/hwosw/Z3eifbmuxBVNNhUkxUrmQvdcAuAzSIQbmHsSDwFkvkqBe0fCzI95YNPtP5xtlS2iE5Uq6ko= Received: from DB6PR0802CA0043.eurprd08.prod.outlook.com (2603:10a6:4:a3::29) by VI1PR0802MB2240.eurprd08.prod.outlook.com (2603:10a6:800:9d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.21; Mon, 24 Feb 2020 20:53:00 +0000 Received: from VE1EUR03FT048.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::205) by DB6PR0802CA0043.outlook.office365.com (2603:10a6:4:a3::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.18 via Frontend Transport; Mon, 24 Feb 2020 20:53:00 +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 VE1EUR03FT048.mail.protection.outlook.com (10.152.19.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.17 via Frontend Transport; Mon, 24 Feb 2020 20:53:00 +0000 Received: ("Tessian outbound d1ceabc7047e:v42"); Mon, 24 Feb 2020 20:52:59 +0000 X-CR-MTA-TID: 64aa7808 Received: from 7b312ee80198.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9AA17F29-39C1-40AF-AD80-D1ED9FCCFDBA.1; Mon, 24 Feb 2020 20:52:54 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7b312ee80198.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 24 Feb 2020 20:52:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kBGMVI0OGmZjTdojbe6t4v8Z1D5gTYq0ah3UUzu6uC2hd7IEBj62dLr3LFcFJf99wAe9wrnh32a01ZYzyK3pvtSd22aXYmpePlRTWgB5qYMAFU+E60Nj7yc4M85hGvcns7miO7rs7BOGb/Mxarko45u7sqZDXUFcEEpZrRCRFaaJIrvNp3ahsTz8/C53khvTJ2KF75wlubfEuoBbLoo4WnTnpMPs8vBbiwe+kjExeEN+Mqq+W8rCOJh54NazVQQb9mTzMoPEer16kixVMivyCAj35RDfyCQryrLBP7Ok1l/8ZhYrd8oUHGiYYupDwSryypu9zhKNxUN0VsEErCaUzA== 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=WHLcFRVCu39a326KVHWrMGyJ3VWDUJfkAZtcFu64CKc=; b=n6R2vRI9vdXAzmG/nxCNbZ7S6wH4nrKJRfuMu0tMp3j/9nYDELg4SUbTds5D8SG19UWiJy0a3C64Eg9S5qDbfOjm6dFuftDFF4cEMrqY0B+im/6etUgoDVHSI0XShIEEnRGUX/ay3wjn0rHFaQTGsBjj4HYDyMtDOAPiNMLihJLFZtKvoZmygBD4rQuB4YIqTuNp4aGrVFCD/9+tfXZES442pq90ejMCaf1Y4uD9wQutUtAppH7XvLV/lGLUyNnUICrkpKFoWpboxDDx1D4TcfQgUpuhTE0efaRs5WgQFqhv0Oq+JwmjhHKHgF0TZnn+5Pem25+XTz6Xv93XdpIrNg== 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=WHLcFRVCu39a326KVHWrMGyJ3VWDUJfkAZtcFu64CKc=; b=5WYEdT7ZumpTE2hrB92rX3b267PlI3sjdsl2SI12XU3RQEVZYyH1SXOFzIzkk05c1YjT753kZtoMkKtgq3rOgspEB7dJD/hwosw/Z3eifbmuxBVNNhUkxUrmQvdcAuAzSIQbmHsSDwFkvkqBe0fCzI95YNPtP5xtlS2iE5Uq6ko= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.27) by VE1PR08MB5181.eurprd08.prod.outlook.com (20.179.31.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.21; Mon, 24 Feb 2020 20:52:51 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::29eb:a1be:8f8f:fae2]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::29eb:a1be:8f8f:fae2%7]) with mapi id 15.20.2750.021; Mon, 24 Feb 2020 20:52:51 +0000 From: Honnappa Nagarahalli To: Stephen Hemminger , Jerin Jacob CC: Konstantin Ananyev , dpdk-dev , Olivier Matz , Honnappa Nagarahalli , nd , nd Thread-Topic: [dpdk-dev] [RFC 0/6] New sync modes for ring Thread-Index: AQHV60maz0SImTGOA0WSh7tfr7VmUKgq0Z5w Date: Mon, 24 Feb 2020 20:52:51 +0000 Message-ID: References: <20200224113515.1744-1-konstantin.ananyev@intel.com> <20200224085919.3e73fda7@hermes.lan> <20200224113529.4c1c94ab@hermes.lan> In-Reply-To: <20200224113529.4c1c94ab@hermes.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: a35b948a-2db1-4fd0-8e42-b50511f65946.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f0fa640e-c259-4c25-df06-08d7b96b88a2 X-MS-TrafficTypeDiagnostic: VE1PR08MB5181:|VE1PR08MB5181:|VI1PR0802MB2240: 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: 032334F434 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(396003)(366004)(376002)(39860400002)(346002)(136003)(189003)(199004)(966005)(81156014)(8676002)(81166006)(478600001)(5660300002)(71200400001)(55016002)(9686003)(33656002)(2906002)(110136005)(52536014)(316002)(54906003)(8936002)(76116006)(6506007)(53546011)(7696005)(4326008)(66476007)(66556008)(64756008)(66946007)(66446008)(86362001)(26005)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB5181; H:VE1PR08MB5149.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; 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: TDWylUTEMQdFUfxTHDnEMFhiido4qM5RI8srCkxve8kgUGyIoEwe3d874/ib50yMPTEOfuJaAKLCHDum/Nelz9IJaV+1BCrOoFXNe+Y1OU6kWKd3o1MJrQel2QXJh8WTGHzApQBFE1rcqOIYtls09DrQeRbLxRUj0yTLdceHSEnZnZh16kWbd5prN+J81zWWtbHFlN3aJuX+0hr8VYdrs45XLAZgU0Wmg10m6RO0g4LFMHP9KBjkWZqhn+Z5HpNErQDxZMjEfBL1ZVE72HUBIjPooQbpUdmhLUnygKtOsrvL3byLALTz7HpUeIwiK3SxcQM8Xmm1BkBuPb8XTK6AyQ/RiCQhuOYWulHaqpoYNn/CCzLfbne0SgjGuXKRv71SzJ8CCzyQefMzJQpOuRQMMurUCb0SDaswWwcLiwP22gIZjEn15TE5/D8Y7FcZXd9m1Q+6EF3oBVHFjGBJ+G1jg9HGhg5B3FMbKhWjtEjZqhsjVIz9IbdxrC4tUS2Ssui7KrIeCPezHlf7p2HsGhJdRg== x-ms-exchange-antispam-messagedata: +2qIIsOe7mYb5wVGsAeOVinmhDDG6NVAodNt4NjnxXbPNZHMpUCl7iB3A5CTEVYjQIzX0FnSAQeDnzQKQabS9OT5TrMDVfMCoMdImZoIQSPacpmVu/wmiV6Y6VKHK42u2X0sukH7iytE5cdx5Ta07g== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5181 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT048.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)(376002)(346002)(136003)(189003)(199004)(336012)(186003)(5660300002)(8936002)(55016002)(9686003)(70586007)(966005)(356004)(70206006)(86362001)(4326008)(54906003)(8676002)(316002)(26005)(110136005)(478600001)(81156014)(81166006)(2906002)(7696005)(36906005)(52536014)(33656002)(6506007)(53546011)(26826003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0802MB2240; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; MX:1; A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: ba5f516b-772e-4f73-ade2-08d7b96b837c X-Forefront-PRVS: 032334F434 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S3S9/U5rzcU0+cKMiErm79S9ozaX8c1A1J5LI7MXJhEzAgWR87bsF1Kt492VLCOb8iP9NRFYtMCIkxP4r0isBQ2JH7rI4SUt5EcZOJ4TteAiJgq/rP9zdW2tnmywZyOy+u6n3DmVbLhQBf3hYiPq+XoiL3rkd6NerTqPO/gtlCedWw7p6SlG+fL5MY+SbQnjVW6NXF3GNkisa5bTCX05rbXv3u/uoLJg9o3iVM2rXJ1+MSffr7uYaUlXNvYcVo4mORt8UsbYervUZbNL27+HKddaFCMZhai03HtVtbHyuD+X+KsTIukdV2LCufwpMtxQsk4D51wXMovSVnMYCA6zDdtfJy4sTC6MyUH3qcCWdi0qHhtfG1wjSt8NnzFViNi6IYon7APXtp8IFSpNHG24L2hD53k+TLJwEWhPTVnE0ZoTQoxLz7rK03qUz/3fNfjOeP5tC/NPACavXIpjWmkDJBLfncQtaQHrcJqT6h3Ajq4DZXH9rais86QSSVbYYqiw8O2sNi1foDFXLWg0WL5wQA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2020 20:53:00.0188 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f0fa640e-c259-4c25-df06-08d7b96b88a2 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: VI1PR0802MB2240 Subject: Re: [dpdk-dev] [RFC 0/6] New sync modes for ring 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" > -----Original Message----- > From: dev On Behalf Of Stephen Hemminger > Sent: Monday, February 24, 2020 1:35 PM > To: Jerin Jacob > Cc: Konstantin Ananyev ; dpdk-dev > ; Olivier Matz > Subject: Re: [dpdk-dev] [RFC 0/6] New sync modes for ring >=20 > On Mon, 24 Feb 2020 23:29:57 +0530 > Jerin Jacob wrote: >=20 > > On Mon, Feb 24, 2020 at 10:29 PM Stephen Hemminger > > wrote: > > > > > > On Mon, 24 Feb 2020 11:35:09 +0000 > > > Konstantin Ananyev wrote: > > > > > > > Upfront note - that RFC is not a complete patch. > > > > It introduces an ABI breakage, plus it doesn't update ring_elem > > > > code properly, etc. > > > > I plan to deal with all these things in later versions. > > > > Right now I seek an initial feedback about proposed ideas. > > > > Would also ask people to repeat performance tests (see below) on > > > > their platforms to confirm the impact. > > > > > > > > More and more customers use(/try to use) DPDK based apps within > > > > overcommitted systems (multiple acttive threads over same pysical > cores): > > > > VM, container deployments, etc. > > > > One quite common problem they hit: Lock-Holder-Preemption with > rte_ring. > > > > LHP is quite a common problem for spin-based sync primitives > > > > (spin-locks, etc.) on overcommitted systems. > > > > The situation gets much worse when some sort of fair-locking > > > > technique is used (ticket-lock, etc.). > > > > As now not only lock-owner but also lock-waiters scheduling order > > > > matters a lot. > > > > This is a well-known problem for kernel within VMs: > > > > http://www-archive.xenproject.org/files/xensummitboston08/LHP.pdf > > > > https://www.cs.hs-rm.de/~kaiser/events/wamos2017/Slides/selcuk.pdf > > > > The problem with rte_ring is that while head accusion is sort of > > > > un-fair locking, waiting on tail is very similar to ticket lock > > > > schema - tail has to be updated in particular order. > > > > That makes current rte_ring implementation to perform really pure > > > > on some overcommited scenarios. > > > > > > Rather than reform rte_ring to fit this scenario, it would make more > > > sense to me to introduce another primitive. The current lockless > > > ring performs very well for the isolated thread model that DPDK was > > > built around. This looks like a case of customers violating the > > > usage model of the DPDK and then being surprised at the fallout. > > > > I agree with Stephen here. > > > > I think, adding more runtime check in the enqueue() and dequeue() will > > have a bad effect on the low-end cores too. > > But I agree with the problem statement that in the virtualization use > > case, It may be possible to have N virtual cores runs on a physical > > core. > > > > IMO, The best solution would be keeping the ring API same and have a > > different flavor in "compile-time". Something like liburcu did for > > accommodating different flavors. > > > > i.e urcu-qsbr.h and urcu-bp.h will identical definition of API. The > > application can simply include ONE header file in a C file based on > > the flavor. > > If need both at runtime. Need to have function pointer or so in the > > application and define the function in different c file by including > > the approaite flavor in C file. >=20 > This would also be a good time to consider the tradeoffs of the heavy use= of > inlining that is done in rte_ring vs the impact that has on API/ABI stabi= lity. >=20 I was working on few requirements in rte_ring library for RCU defer APIs. R= FC is at https://patchwork.dpdk.org/cover/66020/. =