[ofw] [RFC] ib cm: export CM only interface
Fab Tillier
ftillier at windows.microsoft.com
Tue Nov 18 21:27:24 PST 2008
>> The CEP manager doesn't use the AL object stuff because it doesn't need
>> it: the sync destroy wasn't needed since the QP/Listen already
>> implemented it. The QPs/Listens end up hanging out until the CEP is
>> destroyed and invokes the destroy callback (which is just
>> deref_al_obj).
>
> gurgle... There is locking that's shared between invoking a callback
> and destruction. It may be possible to move those locks around to
> ensure that a callback doesn't occur after destroy is called.
That condition is already handled - the race is where the callback has done the state checks and is going to run, the lock has been released, and then another thread takes the lock for destruction before the callback has run. In this case you may need blocking.
I'm against blocking though - it's not necessary in this layer. The caller can block if it's needed, and the caller is best equipped to handle the blocking appropriately. Adding blocking to the destroy path opens up windows for deadlocks (like destroying from the context of a callback).
-Fab
More information about the ofw
mailing list