[ofa-general] Re: [PATCH V2 - libibverbs] Added reference count to completion event channels
Dotan Barak
dotanb at dev.mellanox.co.il
Wed Mar 21 00:35:48 PDT 2007
Roland Dreier wrote:
> It seems that userspace is the only place that has a chance of making
> this work. We just need to get the locking correct, and at first
> glance it looks possible to me. If you don't see a way to do it then
> I'll work on it in the next day or so.
>
I believe that we can avoid problems only if we will have a lock in the
ibv_context that handles the completion channels.
Otherwise, we will always have a problem in the following scenario:
create_channel
thread 1 thread 2
--------- -----------
in create_cq:
is (channel)
destroy channel
get channel lock (seg fault)
If you think about a different solution i will be happy to ear about it.
If you think that adding a lock to the ibv_context is good enough i will
send you a patch that implements this solution.
thanks
Dotan
More information about the general
mailing list