Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1166292pxb; Fri, 21 Jan 2022 11:15:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTDnZO00SJAcSYX2g++TSN5PO4V0kwDivjiC7C4mORhCCjeET6SXYzLPGE5ETACZeLB05L X-Received: by 2002:a17:902:bb87:b0:148:a2e8:2798 with SMTP id m7-20020a170902bb8700b00148a2e82798mr4750660pls.159.1642792537322; Fri, 21 Jan 2022 11:15:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1642792537; cv=pass; d=google.com; s=arc-20160816; b=NnUcbF/FX2lOXVT/MiG4Q8JJT1RPZjLKuwFeiAgbinvAoS2EnxlVFKgywWbfnsKd9e m0tq88KhKp75MrmNPJZr7F79dEAE/oRdopYlbgztMsuyQGXMsb0+NHhUiXf3PNO9yB+d Uzs2kQboolw41yUnymK8bQtzN6vZxVNLasqUtMXgFN7DfX22EhNmsk2b0IVvHixWmsM1 zUUaw6ZHOTfUPOopBxaZQON9v3y1GRHNJGjv7lfe1o5s9HwR+PGvJnBNDx6Pnhz+o3ab Z0GDbamrIEhXZtqYHJ2XyK03vvQtqi8v/poaeWi6zU2eZWUIA83o/4LTmMaK2REno+m6 US/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature; bh=sWPnl6D5wt4VtlA1pWPXdG2p+idYFuuMFe5mxf1Vj4k=; b=OzAwBjM9DWaQCputNQtq4CGLvjj/WF+Gj/3gEP74NlJdRetQ8KmdsXZibvyIZz3/P5 vyVqM562BS9HPSpDQs3nX/+h82yKeQW4DkOvcLKFZZMZE/QbvWCVCvkWtdmIRtZNbFzn FPVyZxk4WJfyC/t/P5PCu5Qt3aTeGk1jZEhXq67r8DbglCYI8RPsqSXObXfzvFCcvdq4 kLpOqa0Wbd4PjQO4cr+fYN2SuC8upo+rvj1OtwM1FFyyDpW4dyOakBLTeCTqy6EuJVsb sWrfU3R7dbHvDHQZzboTLGJysfdGL33A9yB8hvsDdESyt42n56ITiF71Dcugmko5azQ9 /Qew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b="virr/yJ2"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=z7izt45k; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z7si6756043pgf.116.2022.01.21.11.15.24; Fri, 21 Jan 2022 11:15:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b="virr/yJ2"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=z7izt45k; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354684AbiASNMp (ORCPT + 99 others); Wed, 19 Jan 2022 08:12:45 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:8508 "EHLO mx0a-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354629AbiASNMo (ORCPT ); Wed, 19 Jan 2022 08:12:44 -0500 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20JAC35L018362; Wed, 19 Jan 2022 13:12:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=sWPnl6D5wt4VtlA1pWPXdG2p+idYFuuMFe5mxf1Vj4k=; b=virr/yJ2GH26P0vY+0oMP0qMK+h4J8dasZAZzCSCQ1ENML7H887kptzIo6ylfP9a/SKQ kUdBolagj8ruPrb5GkzcfL8u+Bfvw6xQkCrlYSQHyziwcXmB/6Wm2JkGfdgp3JUBNHsb 0yQS7I//JesAyiJcHEabZS/NPzD3P8NXHCdjjXX2S8lkR3ZJOW+GsqNuRA2maF3zI9r0 CEnkV6nNbULSNXPxBkMgJ28R4FQScBK5EVhJd8uKo3ZSCZu3+QnnrKzM/AbT70a8BHSx fgBdpcDV0pe71ZaKcbQ6UxZCRMhFckfdxE8lg/r2ACJbn9ulJcO69KoWFjnimI5wxzJO Ow== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3dnc51cuuc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Jan 2022 13:12:33 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 20JD6Qxi097883; Wed, 19 Jan 2022 13:12:32 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2177.outbound.protection.outlook.com [104.47.56.177]) by aserp3020.oracle.com with ESMTP id 3dkp35uu87-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Jan 2022 13:12:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ex6lp34RUEfFMrtOIDA8KTMveW9/KlwQy85/PsFs5GZTXqek7v/eNYN7diGbxeFFmkDEGHgApOJvGmM1cBerRhErCE2c+vBtbHTQ1DL0IQJyJRzPoUVow1DsTOTCQQxlsfBktypXr2dclZO2ae0tEh0RCuGIftzydQp2Vdg+Ya6wcjHySE7ZSrfjaUda5E0NWAAYnPhyJ0/yrRzBjQ/SiiarwK12tiWKlp6BC0s7IVGsIGLwpGEZ8pZNbobau+AbmyAdvLYaJrh5N/C3yjL3rRl5E++q5lYYs0bN6jUCXPPtHDYg3racEBQ2xJ6XY0ZvTiIoo8VO9btrLqdnW8XrUQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sWPnl6D5wt4VtlA1pWPXdG2p+idYFuuMFe5mxf1Vj4k=; b=HcBpLb1mQEuDUX4ewntUfyIPkhit8qax0LUCoGgy/Gq6JQlfJFEvq6Z74tqECnWsS8MxazRh8Obx3AXo9t0tDGhKcjxQdXfbtLx6+oXTqn9on5HE7sSWcXrsYyQDzLdxno7Swobrs6DbWNmx1ryudqCKwPzSXLYhevrPNy0ZT2FtiVY5TU0KjDYXN+HmnfBMXV/jPUVz/vub8XMOiWxx5U+2udjHR0VkWIUAmIyCh2vrwSM7uhSJS6EBkidGzv1iMS1w4+Hox66bIiWxKVMgqLtdp1H1rGZpXpoF2D5sYOff3Xt00YQBvLqb872F/u69vyp8rOrtY5RXFeV9nqk9LQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sWPnl6D5wt4VtlA1pWPXdG2p+idYFuuMFe5mxf1Vj4k=; b=z7izt45kz0EfsE0p+uMs8RIBXhDBsSeo2YyWje3qUkR7exxLx0s2xPjSz9nYnm+7s18KFwQVVwQhbnH+BHkxCuDoKq5DqwJMLYau8LNiBctNB9pS8sKCb+R8CU1EoOk457Iu8MMUehN0no3PhgcPo0K5xaNIvZpwqxE1Bl4fYhc= Received: from PH0PR10MB5515.namprd10.prod.outlook.com (2603:10b6:510:109::7) by BYAPR10MB2775.namprd10.prod.outlook.com (2603:10b6:a03:86::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Wed, 19 Jan 2022 13:12:30 +0000 Received: from PH0PR10MB5515.namprd10.prod.outlook.com ([fe80::edcf:c580:da6f:4a5]) by PH0PR10MB5515.namprd10.prod.outlook.com ([fe80::edcf:c580:da6f:4a5%6]) with mapi id 15.20.4909.008; Wed, 19 Jan 2022 13:12:30 +0000 From: Praveen Kannoju To: Jason Gunthorpe CC: Leon Romanovsky , Santosh Shilimkar , "David S . Miller" , "kuba@kernel.org" , "netdev@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "rds-devel@oss.oracle.com" , "linux-kernel@vger.kernel.org" , Rama Nichanamatlu , Rajesh Sivaramasubramaniom Subject: RE: [PATCH RFC] rds: ib: Reduce the contention caused by the asynchronous workers to flush the mr pool Thread-Topic: [PATCH RFC] rds: ib: Reduce the contention caused by the asynchronous workers to flush the mr pool Thread-Index: AQHYDHpMX8JHvK1k8kSJh1x30qsksqxo/YyAgAAprgCAAAb9AIAAvOYAgABQL4CAABYHAIAAAX/g Date: Wed, 19 Jan 2022 13:12:29 +0000 Message-ID: References: <1642517238-9912-1-git-send-email-praveen.kannoju@oracle.com> <53D98F26-FC52-4F3E-9700-ED0312756785@oracle.com> <20220118191754.GG8034@ziepe.ca> <20220119130450.GJ8034@ziepe.ca> In-Reply-To: <20220119130450.GJ8034@ziepe.ca> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 313b27a8-33a0-424e-8351-08d9db4d58e7 x-ms-traffictypediagnostic: BYAPR10MB2775:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: nAICxsBbLJCVRCPkzfWGZFMYfBZH6KvzyJXWxLeJNLcQXhxKurLDt8XxlaTw1X3Id/TPdZsC4JKO3YoC2DeU4HA+yf1HlzHX6DNrmkznM/323TrAd1x0PR9UAwNAgBvcNvFFJo/GNtvNysySIhiQe94RnmkDokaIuck7pcUGweaD78ZppGmmFoHwUbEk/RC2joELjoJC2pdYjNa3cl4NCKwN54w78v+woce9072omL7tkuHcf/oSdo3rRY1+MJxo4c8iKLjwqeyEtReskS6JYaUCdNvxXtOI+vaeiWGitCEkD8hlBjVkYNvvMU4fNrvy/65G0oRZ2L1gO9b+5pBxgqink37iuLNo8rcMan+ruO3CGS5rQyK4ycyRerlmjnaOwvEnyNF56SUSMHa150Orvjp2lNrTMJKcn0w0reE/qc7Z5doxJubEC04cJUH0oAeo8u+mIa9Dq9HXQcmD3NmGPIJaNuDODlLrlI0fSJV079v9yltDPiWt7vQv+5ARw6oJCFgu3vB0HltLA5/zk4nhNgBBV2vvOJVcqjwn+VV1Ab9GTbX4YzgsCr/GMD6LNVXtIiFpLhPBwRYirQbnRy6WPk38R1S8NXI4n9c+bWjgIrHQ1vcodCRtThLeaeWA7YYVtomUEqonqAuVRZ5q4/0Iccogd9dAKQzu0U540XEyxuk2MFyJ8YSjmKDAElDfDyhCjZ1js0ll3OaX5jezm4CGuQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5515.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(26005)(5660300002)(66446008)(86362001)(83380400001)(316002)(54906003)(6916009)(53546011)(66946007)(122000001)(38070700005)(38100700002)(66556008)(8936002)(2906002)(71200400001)(9686003)(64756008)(52536014)(4326008)(44832011)(6506007)(66476007)(508600001)(76116006)(186003)(107886003)(7696005)(55016003)(33656002)(8676002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?AoDG3mbs9Z4TEXO/uxMJRAaTUS3cMBzoEJYJ/wkAHi1jmQpPyUREyN3zG+5p?= =?us-ascii?Q?dvVsOcI1sl40N8/1uxyLoPUJPkPsW6QdnuJ8LG3CCT9TQDz8VYTJ2f6jQlJ4?= =?us-ascii?Q?qJMkqqN3/4bmTDhYaWM2qwPepOYm8Lv33RAxU1/tuF0s87Ar90roELadCdp7?= =?us-ascii?Q?/uHjLyIGq0F22NGiRNaxkNxsDJaxY2MHMwlAnol2yqTC1IM10hgxxHBDlHDv?= =?us-ascii?Q?3pRKhKX8r03FHIRjGbP5+S8NIx57P8zsiDjkb97ZhAI4RIeUwWQ7WjvL1F9k?= =?us-ascii?Q?+An5Klz7hd1AOErAEd0g4KB9AVhcWSh6cf4CZrH714BciycpgHIUSeFm16oK?= =?us-ascii?Q?hIooLu2D1G60v63y7HikqKc2Do7Rb+E3ld9WADU+RUBA42BosKHpEH7kZUEk?= =?us-ascii?Q?4jtjC3nedpUWpwtjTPb1YvUXrKidTJfUyv83Toyk2ge6qHcAlM173dvDzbFn?= =?us-ascii?Q?BwVCJRf6pgr27nScXk168ITLAW9kD89mbmqH3ot4OsulmlE5tfY53eUYjBj/?= =?us-ascii?Q?h5lJkgSOuPTP/3ja8C6bbNx1CKD0TsaYpReHFoaKEwj9Ph7XzPL8FoI1Uvhb?= =?us-ascii?Q?dnBr/TivUHSNBB6TGCwMxiLn6Y5sEhJnD0RREBkr3H+fo+yVdX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b2hSpMmKp5pqJRmaMOKdOlXZO6zc?= =?us-ascii?Q?ENNTBXnlR/j23eemWC3dmNb2C58PXG8K43boPPfPxqVbjcpchv+iWHgzuJ/D?= =?us-ascii?Q?9m3vK0il0A5iVytKMjosCWXmDKDy6sv0caWhkkNqJJuA/5ngboBo+lK3nUL1?= =?us-ascii?Q?OmlzXA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5515.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 313b27a8-33a0-424e-8351-08d9db4d58e7 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jan 2022 13:12:29.9230 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: aFKrt00wGBVhiHulGm1OcaRTElCA8aVnOhY79sFtCXIW5Jm4hSmRV9OA0gYt1tPpkTaEpJ/KIx/Vl6fuCAyMJaR3/V41xI4ro2khyS8NOhI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB2775 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10231 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 malwarescore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201190076 X-Proofpoint-GUID: XOh0Gxm_PvqUG19x87V1uI1iHhNGiFOj X-Proofpoint-ORIG-GUID: XOh0Gxm_PvqUG19x87V1uI1iHhNGiFOj Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org -----Original Message----- From: Jason Gunthorpe [mailto:jgg@ziepe.ca]=20 Sent: 19 January 2022 06:35 PM To: Praveen Kannoju Cc: Leon Romanovsky ; Santosh Shilimkar ; David S . Miller ; kuba@kernel.org; netd= ev@vger.kernel.org; linux-rdma@vger.kernel.org; rds-devel@oss.oracle.com; l= inux-kernel@vger.kernel.org; Rama Nichanamatlu ; Rajesh Sivaramasubramaniom Subject: Re: [PATCH RFC] rds: ib: Reduce the contention caused by the async= hronous workers to flush the mr pool On Wed, Jan 19, 2022 at 11:46:16AM +0000, Praveen Kannoju wrote: =20 > 6. Jason, the only function "rds_ib_free_mr" which accesses the=20 > introduced bool variable "flush_ongoing" to spawn a flush worker does=20 > not crucially impact the availability of MR's, because the flush=20 > happens from allocation path as well when necessary. Hence the=20 > Load-store ordering is not essentially needed here, because of which=20 > we chose smp_rmb() and smp_wmb() over smp_load_acquire() and=20 > smp_store_release(). That seems like a confusing statement, you added barriers which do the same= things as acquire/release then say you didn't need acquire release? I think this is using barriers wrong. Jason Jason,=20 Yes, we are using the barriers. I was justifying the usage of smp_rmb() and= smp_wmb() over smp_load_acquire() and smp_store_release() in the patch.=20