On Thu, Oct 01, 2015 at 12:37:36PM -0400, Chuck Lever wrote: > A missed WC will result in an RPC/RDMA transport deadlock. In > fact that is the reason for this particular patch (although > it addresses only one source of missed WCs). So I would like > to see that there are no windows here. WCs are never missed. The issue is a race where re-arming the CQ might not work, meaning you don't get an event. You can certainly use arrays with poll_cq. There is no race in the API here. But you have to use the IB_CQ_REPORT_MISSED_EVENTS scheme to guarantee the CQ is actually armed or continue to loop again. Basically you have to loop until ib_req_notify_cq succeeds. Any driver that doesn't support this is broken, do we know of any? while (1) { struct ib_wc wcs[100]; int rc = ib_poll_cq(cw, NELEMS(wcs), wcs); .. process rc wcs .. if (rc != NELEMS(wcs)) if (ib_req_notify_cq(cq, IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS) == 0) break; } API wise, we should probably look at forcing IB_CQ_REPORT_MISSED_EVENTS on and dropping the flag. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html