[openib-general] [KDAPL] module initialization order

Bernhard Fischer blist at aon.at
Wed May 11 05:41:57 PDT 2005


On Tue, May 10, 2005 at 02:13:47PM -0700, Roland Dreier wrote:
>    James> That situation could be viewed as a configuration error. I
>    James> think we can use the kconfig language to prevent this.

You could select y the parent-provider of a module, yes. This doesn't
take care of removal when all parts are modules, though.
>
>How do you deal with
>
>    modprobe kdapl
>    modprobe nfs_rdma
>    modprobe mthca
>
>Or how about:
>
>    modprobe mthca
>    modprobe kdapl
>    modprobe nfs_rdma
>    <hotplug HCA>

If i understand the question correctly, isn't hotplug (i.e. userspace)
taking care of this?
locally for e.g. ipoib, i have something along the lines of:
tst11:~ # modprobe -v ib0
install /sbin/modprobe -v ib_mthca && /sbin/modprobe -v ib_ipoib
insmod /lib/modules/2.6.12-rc4/kernel/drivers/infiniband/core/ib_core.ko 
insmod /lib/modules/2.6.12-rc4/kernel/drivers/infiniband/core/ib_mad.ko 
insmod
/lib/modules/2.6.12-rc4/kernel/drivers/infiniband/hw/mthca/ib_mthca.ko 
insmod /lib/modules/2.6.12-rc4/kernel/drivers/infiniband/core/ib_sa.ko 
insmod
/lib/modules/2.6.12-rc4/kernel/drivers/infiniband/ulp/ipoib/ib_ipoib.ko 
tst11:~ # now hotplug would call the 'remove' line for e.g. ipoib et al^A^K^J
tst11:~ # modprobe -v -r ib_ipoib
remove /sbin/rmmod ib_ipoib ; /sbin/rmmod ib_sa ; /sbin/rmmod ib_mthca ;
/sbin/rmmod ib_mad ; /sbin/rmmod ib_core

The pci hotplug should have taken care to decrement the use count, so if
you pulled the last user, userspace hotplug would unload the unused (if
configured to do so) parts of the driver chain.

NFS users in the above example would just sit there and block, i think.



More information about the general mailing list