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

Caitlin Bestler caitlinb at broadcom.com
Tue Jan 31 09:20:18 PST 2006


openib-general-bounces at openib.org wrote:
> 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.
> 
> True, although documentation/SubmittingPatches does say
> "Don't try to anticipate nebulous future cases which may or may not 
> be useful" :) 
> 

This is not an issue of a nebulous future change. This is a 
matter of one device trying to force future devices to have
the same limitation.

Devices that do not require a host-wide spinlock to poll the
CQ are not hypothetical, they exist even if drivers under
OpenIB for them do not yet exist. Not planning for the needs
of such drivers will not help the process of making those
drivers exist.

This is not a question of extra work, just assigning the
responsibility to the correct layer -- that is to the
device specific code. This is a proper recognition that
the logic is in fact device dependent.






More information about the general mailing list