Re: [PATCH 5/9] IB/core: add a simple MR pool

Christoph Hellwig
2016-03-02T09:14:10Z

On Tue, Mar 01, 2016 at 11:12:09AM -0800, Bart Van Assche wrote:
> A second question about this patch: why do we need locking in
> ib_mr_pool_init() and ib_mr_pool_destroy()? Calling ib_mr_pool_get() or
> ib_mr_pool_put() while one of these two functions is in progress is a bug
> (race condition). Can the locking be left out from these two functions?

Maybe. But then we'd need to use barrier to ensure no reordering ever
happens. Just using the lock in the this slow path as well makes that
a lot easier.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html