All of lore.kernel.org
 help / color / mirror / Atom feed
From: Praveen Kannoju <praveen.kannoju@oracle.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Leon Romanovsky <leon@kernel.org>,
	Santosh Shilimkar <santosh.shilimkar@oracle.com>,
	"David S . Miller" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"rds-devel@oss.oracle.com" <rds-devel@oss.oracle.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Rama Nichanamatlu <rama.nichanamatlu@oracle.com>,
	Rajesh Sivaramasubramaniom 
	<rajesh.sivaramasubramaniom@oracle.com>
Subject: RE: [PATCH RFC] rds: ib: Reduce the contention caused by the asynchronous workers to flush the mr pool
Date: Wed, 19 Jan 2022 14:08:48 +0000	[thread overview]
Message-ID: <PH0PR10MB5515039926FA5F66537A6EBB8C599@PH0PR10MB5515.namprd10.prod.outlook.com> (raw)
In-Reply-To: <20220119131728.GK8034@ziepe.ca>

-----Original Message-----
From: Jason Gunthorpe [mailto:jgg@ziepe.ca] 
Sent: 19 January 2022 06:47 PM
To: Praveen Kannoju <praveen.kannoju@oracle.com>
Cc: Leon Romanovsky <leon@kernel.org>; Santosh Shilimkar <santosh.shilimkar@oracle.com>; David S . Miller <davem@davemloft.net>; kuba@kernel.org; netdev@vger.kernel.org; linux-rdma@vger.kernel.org; rds-devel@oss.oracle.com; linux-kernel@vger.kernel.org; Rama Nichanamatlu <rama.nichanamatlu@oracle.com>; Rajesh Sivaramasubramaniom <rajesh.sivaramasubramaniom@oracle.com>
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().

3. In case the function "rds_ib_free_mr", misses to spawn the flush function, the same will be requested by the allocation path  "rds_ib_alloc_frmr" which in-turn calls "rds_ib_try_reuse_ibmr", which finally calls the flush function "rds_ib_flush_mr_pool" to obtain mr, during mr allocation requests.

4. If you still insist, we can modify the patch to use  smp_load_acquire()  and smp_store_release().

Regards,
Praveen.

  reply	other threads:[~2022-01-19 14:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 14:47 [PATCH RFC] rds: ib: Reduce the contention caused by the asynchronous workers to flush the mr pool Praveen Kumar Kannoju
2022-01-18 16:48 ` Santosh Shilimkar
2022-01-18 18:00   ` Leon Romanovsky
2022-01-18 19:17   ` Jason Gunthorpe
2022-01-18 19:42     ` Santosh Shilimkar
2022-01-19  6:59       ` Leon Romanovsky
2022-01-19 11:46         ` Praveen Kannoju
2022-01-19 13:04           ` Jason Gunthorpe
2022-01-19 13:12             ` Praveen Kannoju
2022-01-19 13:17               ` Jason Gunthorpe
2022-01-19 14:08                 ` Praveen Kannoju [this message]
2022-01-19 14:49                   ` Jason Gunthorpe
2022-01-19 14:56           ` Leon Romanovsky
2022-01-20  8:00             ` Praveen Kannoju
2022-01-20 11:11               ` Leon Romanovsky
2022-01-20 11:57                 ` Praveen Kannoju
2022-01-20 12:21                   ` Leon Romanovsky
2022-01-20 12:27                     ` Praveen Kannoju
  -- strict thread matches above, loose matches on Subject: below --
2022-01-18 13:10 Praveen Kumar Kannoju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR10MB5515039926FA5F66537A6EBB8C599@PH0PR10MB5515.namprd10.prod.outlook.com \
    --to=praveen.kannoju@oracle.com \
    --cc=davem@davemloft.net \
    --cc=jgg@ziepe.ca \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rajesh.sivaramasubramaniom@oracle.com \
    --cc=rama.nichanamatlu@oracle.com \
    --cc=rds-devel@oss.oracle.com \
    --cc=santosh.shilimkar@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.