[openib-general] [PATCH] mthca: eq doorbell coalescing + prevent even queque overrun

Michael S. Tsirkin mst at mellanox.co.il
Tue Jan 10 00:32:55 PST 2006


Quoting Or Gerlitz <ogerlitz at voltaire.com>:
> > I am seeing EQ overruns in SDP stress tests: if CQ completion
> > handler arms a CQ, this could generate more EQEs, so that
> > EQ will never get empty and consumer index will never get updated.
> 
> There's something re CQ arming which i'd like to bring up.
> 
> I see that the mad, ipoib and srp CQ handlers work as follows: first - 
> arm the CQ, second - poll the CQ in a loop till it is emtpy. What is the 
> reasoning behind this approach?

Thats what IB spec says.

> does it means that completions occurring 
> while the handler is running cause interrupts which could be saved?

Handlers are running out of the interrupt context, so
an interrupt would have to be generated in the window while
CQ is being armed. Profiling I've done on ipoib shows that
this is quite unlikely.

> is there any problem with first empty-ing the CQ and only then arming it?
> 
> The latter approach is taken by iser code. As far as i understand it can 
> not cause the ib consumer to miss interrupts, am i wrong?

On Mellanox hardware you wont miss interrupts in this case if you always poll
CQ and then arm it as a result of an interrupt.

-- 
MST



More information about the general mailing list