[openib-general] [PATCH] cancel outstanding MADs when deregistering
Roland Dreier
roland at topspin.com
Tue Sep 28 12:50:52 PDT 2004
Sean> This patch should allow canceling of sent MADs when
Sean> deregistration occurs. This seemed a little trickier (to
Sean> keep simple anyway) than I thought at first, so comments are
Sean> welcome.
It looks OK for current functionality but I think it will have to
change to support cancelling sends. (Cancelling sends is required
for consumers that start a query with a long timeout and then want to
unload or something like that).
When someone asks to cancel a send you have to tell the consumer
whether the send was canceled or had already finished (so that they
know whether the resources have already been freed). You have to make
sure that you don't say that the send wasn't canceled and then return
with the send completion handler still running on some other CPU,
because then the consumer will probably corrupt context.
That means that you can't just remove things from your pending list
like the code does now -- you have to leave them there and mark them
"callback running" or something like that. It ends up being even more
complicated unfortunately.
- Roland
More information about the general
mailing list