Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1169896pxb; Fri, 21 Jan 2022 11:20:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAUn+BEREyvouopee7lkL25tpt+5UzJtIS47IyG+4APZgHYkmdf66/88FtbYkr/UVFgpNO X-Received: by 2002:a05:6a00:2351:b0:4c5:1b79:dd16 with SMTP id j17-20020a056a00235100b004c51b79dd16mr4769766pfj.40.1642792848473; Fri, 21 Jan 2022 11:20:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642792848; cv=none; d=google.com; s=arc-20160816; b=o4oY17q2TRBV0s3Acd14dQuBDtAn+9gQIZ7IO8A+ipAoR6CMLCLvM9+MV7c7RX0jiT rbIyZmetfkpe/2rjpLvb8bwuyTLgVRGc2qHNmaMB211NVQt0/hhvG/4n64jsekAfquLp 68W6QgLyXwJxDql5uILdb9W3EAaZJ66PDzU2OP0RBb3CIcOmuBXnaiytbp6BZ83S00X4 DqOXjdE1FjySCdSov8hwuSYB75PTLOYyOsvGPJjHN61jPD4OJ1Cky+3VZYyL3a8n7vm9 SIGxzxTItxqBXzp2ckcPPLpASvdH64TFxgBZOHtDx2YkNyCer0Mj2yrhCtqvqN0tscUL TxxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4ebj2v9aauSthzIYWo7QMYbJ7+f74Bs+InfheCepxYQ=; b=xBZzvXJFy0y4IiCkI1jPH207BGdMiioO31IqHrA0jX0mxrAlAkQepw06Hdb4NVSlDw bS5rWeZvq2OXQmh4/FrmGG4SmCPSdWr/ROwHwXwnVUtdRHe9YEG163DwS2RYVuvHlJcK 9DlbTaKuS/e2XwREQ/eEhKiiXdo5ZFUNEJ9NUEaksocEDtOqJy1yVAhi5LbO/0lU7sLN NCzGkMYAP7Jpgs9WW7S83Tam4W9RxaO4bUK+bv63mzz1Kal3erPXDKVcgyDAPUVJlpAb CDTSFxr99zQm0eNrQ5zhzyO8gE4IXiCvQcX8vbq+5ZNL0OhmXodwSP5AfA0EoVIKsuDF x2EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=UyBhcZyq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l62si2933877pge.349.2022.01.21.11.20.36; Fri, 21 Jan 2022 11:20:48 -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=@ziepe.ca header.s=google header.b=UyBhcZyq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355283AbiASOt0 (ORCPT + 99 others); Wed, 19 Jan 2022 09:49:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355256AbiASOtZ (ORCPT ); Wed, 19 Jan 2022 09:49:25 -0500 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD8C0C061574 for ; Wed, 19 Jan 2022 06:49:24 -0800 (PST) Received: by mail-qt1-x831.google.com with SMTP id d4so2526182qtw.1 for ; Wed, 19 Jan 2022 06:49:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4ebj2v9aauSthzIYWo7QMYbJ7+f74Bs+InfheCepxYQ=; b=UyBhcZyqV06Q+lerX33fodCKzbbo6UN21015hA1XzKQSN3/aDtkNZraQJqfTwrgQ9E iJyEonr90tPHETmsWEVeKf5Fiv0ZY9Ojvum3iYQNo3dQBI+vbNsEig6xG0RhmLGyVv2L A1eqnTBh4sxStbn7+6lmoo08j6xFIC7A5VQ07TpM83Xbae6snqjRS2y/vJtxEFOMS2M4 fktALHxE9fdS245d+fE6q7SWGXuhk8AJoFyibv2SC06N8v2e8bZy14soeOh1AwK8s2Dd Qsflu8/pNW1JTBjN1A2W1xETT7Mhbp3igJF3HCSz7nrkfQhlTavAnt9VAMYvq7eLstHa Y+TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4ebj2v9aauSthzIYWo7QMYbJ7+f74Bs+InfheCepxYQ=; b=EdJK+iS/8h1dazFZWJqpfjcNVZHNs6UvgS4toFVUbqfjQEsFd03fPKKAejWtGHG1ge IfBCJeXZYlLrJiVRJzakc9dcuj9FZQ8lliPeNEUHxHufXKjb8BgDWwvV+7a5lObeagWH jLZJNleELCRHytFBwFok10e9KdnPNXeA6YYq3O6j0VW5bxHAOeF49IFx4fqsHxKTihGe LbP3Edx4HX4mTzLL5RuNqS7jKybrii40fDkyX7mKppHWTkIqv8/phDSvyROdvRrFQCi0 t+hxrtNK2rbPgZHNek3lnX2bTKFRGkyeWEg2ETkjgYPcES1IxjEtPs2fW8uDmL3dPi6S O7Aw== X-Gm-Message-State: AOAM531Y3VTRHGdgyO85QmTmS67B0iXlH+3WA4oDxzYLuqgVEvGn0jxX gglhdb4T/97fcxNvltsBIJgz9w== X-Received: by 2002:ac8:7c46:: with SMTP id o6mr4946928qtv.587.1642603763909; Wed, 19 Jan 2022 06:49:23 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id z11sm4717707qta.1.2022.01.19.06.49.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jan 2022 06:49:22 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1nACH2-001K1X-E7; Wed, 19 Jan 2022 10:49:20 -0400 Date: Wed, 19 Jan 2022 10:49:20 -0400 From: Jason Gunthorpe To: Praveen Kannoju 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 Message-ID: <20220119144920.GL8034@ziepe.ca> 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> <20220119131728.GK8034@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 19, 2022 at 02:08:48PM +0000, Praveen Kannoju wrote: > From: Jason Gunthorpe [mailto:jgg@ziepe.ca] > Sent: 19 January 2022 06:47 PM > To: Praveen Kannoju > 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 > > On Wed, Jan 19, 2022 at 01:12:29PM +0000, Praveen Kannoju wrote: > > > 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. > > You failed to justify it. > > Jason > > Apologies, if my earlier point is not clear, Jason. > Let me reframe: > > 1. The introduced bool variable "flush_ongoing", is being accessed only in the function "rds_ib_free_mr" while spawning asynchronous workers. > > 2. The ordering guaranteed by smp_rmb() and smp_wmb() would be > sufficient for such simple usage and hence we did not use > smp_load_acquire() and smp_store_release(). Again you haven't defined why these barriers are any differnet from acquire/release or even *what they are doing* Jason