lkml.org 
[lkml]   [2022]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH RFC] rds: ib: Reduce the contention caused by the asynchronous workers to flush the mr pool
Date
-----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.

\
 
 \ /
  Last update: 2022-01-19 15:09    [W:3.671 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site