[openib-general] Re: ib_mad: Scenarios for returning posted send MADs

Michael S. Tsirkin
Tue Oct 5 08:26:28 PDT 2004


Hello!
Quoting r. Hal Rosenstock (halr at voltaire.com) "[openib-general] Re: ib_mad: Scenarios for returning posted send MADs":
> > Unless there's a bug in the code, I don't believe that we can have send 
> > callbacks to stale MAD agents.  If you're trying to have the code deregister 
> > for a client, this would be impossible.  Clients should receive some sort 
> > of removal notification event and would need to deregister in response 
> > to that event.
> 
> It all depends on the ordering of these shutdown events. If the removal
> event went to all modules simultaneously, there would need to be an
> interlock to prevent this from occuring.
> 
> In any case, what should the MAD layer do when there are posted sends on
> an agent list ? Should it just dump them and not attempt to make a
> callback ? The bad side of this is that there are legitimate scenarios
> where this might occur. Not making the send callback has a number of
> side effects beyond the individual client (in terms of PCI mapping and
> memory leakage).
> 
> -- Hal

I dont see where is this coming from.
You dont want each send to play with locks and/or counters just to
prevent module removal - it will hurt performance,
and module reference count shall take care of that for you.

For power management and/or hotswap, thats another issue.

As Sean points out, you must first
remove all client modules before removing the driver, or modprobe -r
will fail.

Force I think is for debugging, like for bugs in reference counting.

MST


More information about the openib-general mailing list