Subject: Re: [PATCH RFC] rds: ib: Reduce the contention caused by the asynchronous workers to flush the mr pool

From: Jason Gunthorpe <[email-masked]>
Date: Wed, 19 Jan 2022 09:04:50 -0400

On Wed, Jan 19, 2022 at 11:46:16AM +0000, Praveen Kannoju wrote:
 
> 6. Jason, the only function "rds_ib_free_mr" which accesses the
> introduced bool variable "flush_ongoing" to spawn a flush worker
> does not crucially impact the availability of MR's, because the
> flush happens from allocation path as well when necessary.  Hence
> the Load-store ordering is not essentially needed here, because of
> which we chose smp_rmb() and smp_wmb() over smp_load_acquire() and
> 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