Re: [PATCH RFC] rds: ib: Reduce the contention caused by the asynchronous workers to flush the mr pool
From: Jason Gunthorpe
Date: Wed Jan 19 2022 - 09:49:29 EST
On Wed, Jan 19, 2022 at 02:08:48PM +0000, Praveen Kannoju wrote:
> From: Jason Gunthorpe [mailto:jgg@xxxxxxxx]
> Sent: 19 January 2022 06:47 PM
> To: Praveen Kannoju <praveen.kannoju@xxxxxxxxxx>
> Cc: Leon Romanovsky <leon@xxxxxxxxxx>; Santosh Shilimkar <santosh.shilimkar@xxxxxxxxxx>; David S . Miller <davem@xxxxxxxxxxxxx>; kuba@xxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-rdma@xxxxxxxxxxxxxxx; rds-devel@xxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Rama Nichanamatlu <rama.nichanamatlu@xxxxxxxxxx>; Rajesh Sivaramasubramaniom <rajesh.sivaramasubramaniom@xxxxxxxxxx>
> 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