[openib-general] Re: [PATCH 2/6] [RFC] mthca kernel changes for resizeCQ

Roland Dreier rdreier at cisco.com
Mon Jan 30 14:12:38 PST 2006


 > static inline int ib_poll_cq(struct ib_cq *cq, int num_entries,
 >                              struct ib_wc *wc)
 > {
 > 	unsigned long flags;
 > 	int ret;
 > 	spin_lock_irqsave(cq->lock, flags);
 >         ret = cq->poll_cq(cq, num_entries, wc);
 > 	spin_unlock_irqrestore(cq->lock, flags);
 > 	return ret;
 > }

Definitely an interesting idea, although it doesn penalize a
hypothetical device that can do lock-free CQ polling somehow.

My bias has been to leave locking to the low-level driver, but if you
can show an improvement on real hardware with this idea then I would
be inclined to use this approach.

 - R.



More information about the general mailing list