[openib-general][PATCH][kdapl]: inc/dec module ref count

James Lentini jlentini at netapp.com
Tue Aug 2 11:00:10 PDT 2005



On Tue, 2 Aug 2005, Guy German wrote:

>> Guy, can you investigate why the ib_mthca module doesn't have a
>> reference count and see if it relates to hotplug? I think
>> kdapl_ib and
>> ib_mthca should have the same policy regarding this issue.
>
> As I understand, consumers are working over ib_core and not over 
> ib_mthca directly. So, if (from a hotplug reason) ib_mthca goes 
> down, ib_core consumers can get notified of the event, by an upcall.

Correct. Is the fact that ib_mthca always has a reference count of 0 a 
concious design decision to support hotplug? I think the answer is 
yes, I just want to make sure.

> If you take this model to dapl, I think it would influence the way 
> dapl consumers need to do things (like registering an upcall and 
> know what to do in case kdapl_ib is down).
>
> I also don't know how many consumers really need "dapl hotplug"...

Long term, kDAPL should support hotplug. As you say, we will need to 
modify the API to support this (as noted in the kDAPL TODO list in the 
Wiki).

As the code stands now, we should protect users from accidently 
removing kdapl_ib.

Are you re-working your patch for this?

I've thought about this some more. To be safe, I think the module 
reference counts should be adjusted in dat_registry_add_provider() and 
dat_registry_remove_provider().



More information about the general mailing list