[openib-general] qp lock in mthca_poll_cq

Michael S. Tsirkin mst at mellanox.co.il
Thu Aug 12 00:46:43 PDT 2004


Quoting r. Michael S. Tsirkin (mst at mellanox.co.il) "[openib-general] qp lock in mthca_poll_cq":
> Hi, Roland!
> Why do you need the qp locked in mthca_poll_cq_one?
> Since the wr_id table has an entry per QP per WQE, and since you
> use atomics for the ref count, it seems you should not need this lock?
> 
> Thanks,
> MST

Further, I dont fully understand the use of qp->refcount in that function?
Is it true that what you are trying to do is to call wake_up only once
on the same qp?
The reason I ask is that if there is a mix of completions from different
qps, it seems that wake_up is still called mutple times.
So why not use a local variable in  mthca_poll_cq for this , and
avoid atomics (which are expensive)?

MST



More information about the general mailing list