From: Michael S. Tsirkin Date: Mon, 9 Jan 2006 22:04:40 +0000 (-0800) Subject: IB/mthca: prevent event queue overrun X-Git-Tag: v2.6.16-rc1~172^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92898522e3ee1a0ba54140aad1974d9e868f74ae;p=pandora-kernel.git IB/mthca: prevent event queue overrun I am seeing EQ overruns in SDP stress tests: if the 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. This is similiar to what we have with command interface: /* * cmd_event() may add more commands. * The card will think the queue has overflowed if * we don't tell it we've been processing events. */ However, for completion events, we *don't* want to update the consumer index on each event. So, perform EQ doorbell coalescing: allocate EQs with some spare EQEs, and update once we run out of them. The value 0x80 was selected to avoid any performance impact. Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier --- Reading git-diff-tree failed