[rds-devel] comments on the send CQ completion handler

Or Gerlitz ogerlitz at voltaire.com
Wed Jan 9 08:55:13 PST 2008


Or Gerlitz wrote:
> Looking on rds_ib_send_cq_comp_handler I see few issues, see my inline comments:

> +void rds_ib_send_cq_comp_handler(struct ib_cq *cq, void *context)
> +		oldest = rds_ib_ring_oldest(&ic->i_send_ring);
> +		send = &ic->i_sends[oldest];
> +
> +		completed = rds_ib_ring_completed(&ic->i_send_ring, wc.wr_id, oldest);
> +
> +		for (i = 0; i < completed; i++) {
> +			if (wc.opcode == IB_WC_SEND) {
> +				if (send->s_rm)
> +					rds_ib_send_unmap_rm(ic, send);
> +			}

> This wc actually represents $completed completions so the value of wc.opcode is only
> relevant for the --last-- iteration, a quite easy fix for that would be to mark the
> opcode at the send strucutre.

I see a similar phenomena on the recv cq event handler, that is 
referring only the polled completion and not the sequence of work 
requests it represents - that is with dma unmapping etc. OTOH, I think 
that if I was simply correct, after few minutes of runs there would be 
some sever memory leaks, so there's something I don't see here. Can you 
clarify this point?

Or.




More information about the rds-devel mailing list