[openib-general] Loading / unloading IB modules
Roland Dreier
Mon Mar 29 09:16:23 PST 2004
Makia> Quite strange behaviour. Hopefully you've made it all the
Makia> way to the bottom of this email...
Yup, I made it. Thanks for running the experiments. I think I know
what the problem is: ib_tavor and all the rest of the Mellanox driver
modules are not directly referenced by most of the other modules (eg
ib_ipoib). That's because ib_tavor just registers some function
pointers with the ib_core module.
I guess the solution is to add a struct module * to the structure that
device drivers register with the IB core, and then have the core
increment the reference count whenever a PD or CQ is created (since
every other IB object is associated with one of these, I think this
should be sufficient).
Unfortunately 2.4 doesn't have try_module_get et al., so this will be
at least somewhat racy. However it should fix module unloading in
most circumstances.
I'll implement this in my tree and if it works, post patches.
- Roland
--
To unsubscribe send an email with subject unsubscribe to openib-general at openib.org.
Please contact moderator at openib.org for questions.
More information about the openib-general mailing list