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

Michael S. Tsirkin mst at mellanox.co.il
Tue Jan 31 02:58:22 PST 2006


Quoting r. Roland Dreier <rdreier at cisco.com>:
> Subject: Re: [PATCH 2/6] [RFC] mthca kernel changes for resizeCQ
> 
>  > 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.

I guess we'll always be able to move back to current code
if/when such a device appears.

> 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.

BTW, just moving poll_cq and req_notify_cq to struct ib_cq will already remove
one indirection level from the datapath.  And this can be done without touching
low-level drivers.

Same for QP and various ib_post callbacks.

Should I submit such a patch? Sean?

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies



More information about the general mailing list