[ofa-general] Re: [RFC V4 PATCH 3/5] rdma/cma: simply locking needed for serialization of callbacks

Or Gerlitz ogerlitz at voltaire.com
Wed May 28 23:23:59 PDT 2008


Sean Hefty wrote:
> I wasn't clear on this before, but we shouldn't need to take the spinlock here
> at all now.  We needed it before in order to check the state and increment
> dev_remove in one operation.  Once the spinlock was released the state could
> have changed, but dev_remove would have halted the device removal thread.  Under
> the new method, device removal is halted while we hold the handler_mutex.
OK, got it.

> This can end up trying to acquire the mutex twice.  We could change this to
> mutex_lock();
> if (id_priv->state == CMA_ADDR_BOUND || id_priv->state == CMA_ADDR_RESOLVED)
>
OK, will do so.





More information about the general mailing list