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

Olaf Kirch olaf.kirch at oracle.com
Thu Jan 10 00:02:31 PST 2008


On Wednesday 09 January 2008 17:55, Or Gerlitz wrote:
> 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?

Not having written that code - here's why I believe it works after
looking at it for quite some time.

A message can be broken up into several WRs - SENDs must be
fragmented into 4K chunks, and RDMA ops must be chopped up
so that they don't exceed the SGE limit.

In all the rds_ib_xmit* routines you will find that we will
set IB_SEND_SIGNALED on the last WR. So when ib_poll_cq gives us
a work completion, that WC will never span WRs from different messages.
It will either refer to a SEND of a congestion map, or (part of)
a message SEND, or (part of) a RDMA op. That's why it should be safe
to look at wc.opcode directly.

Olaf
-- 
Olaf Kirch  |  --- o --- Nous sommes du soleil we love when we play
okir at lst.de |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax



More information about the rds-devel mailing list