Re: [PATCH v2 rdma-core 0/6] Common udev/systemd based module auto loading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/4/2017 12:22 PM, Benjamin Drung wrote:
> Am Donnerstag, den 03.08.2017, 11:52 -0600 schrieb Jason Gunthorpe:
>> On Thu, Aug 03, 2017 at 02:00:59PM +0200, Benjamin Drung wrote:
>>
>>> Yes. That was the issue. I am using an initrd (from initramfs-
>>> tools).
>>> The mlx4_core module was included in the initrd, but mlx4_ib was
>>> missing. I tweaked initramfs-tools to include mlx4_ib and then it
>>> was
>>> autoloaded. Thanks.
>>
>> Do you know how to fix this generally for Debian? Is it possible?
> 
> Analysis for Debian jessie/stretch:
> 
> $ sudo update-initramfs -uv
> [...]
> Copying module directory kernel/drivers/net
> (excluding appletalk arcnet bonding can dummy.ko hamradio hippi ifb.ko
> irda macvlan.ko macvtap.ko pcmcia sb1000.ko team tokenring tun.ko usb
> veth.ko wan wimax wireless xen-netback.ko)
> [...]
> Adding module /lib/modules/$version/kernel/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko
> Adding module /lib/modules/$version/kernel/drivers/net/ethernet/mellanox/mlx4/mlx4_core.ko
> 
> update-initramfs calls auto_add_modules() in
> /usr/share/initramfs-tools/hook-functions which includes 'net' as
> default. The 'net' option calls 
> "copy_modules_dir kernel/drivers/net [...]" which copies the
> mlx5_core.ko and mlx4_core.ko modules.
> 
> but the mlx4_ib.ko module is in the infiniband directory:
> 
> $ find kernel/drivers/infiniband ! -type d
> kernel/drivers/infiniband/hw/mlx5/mlx5_ib.ko
> kernel/drivers/infiniband/hw/mthca/ib_mthca.ko
> kernel/drivers/infiniband/hw/mlx4/mlx4_ib.ko
> kernel/drivers/infiniband/core/ib_sa.ko
> kernel/drivers/infiniband/core/ib_umad.ko
> kernel/drivers/infiniband/core/ib_netlink.ko
> kernel/drivers/infiniband/core/ib_core.ko
> kernel/drivers/infiniband/core/rdma_cm.ko
> kernel/drivers/infiniband/core/ib_ucm.ko
> kernel/drivers/infiniband/core/ib_addr.ko
> kernel/drivers/infiniband/core/rdma_ucm.ko
> kernel/drivers/infiniband/core/ib_cm.ko
> kernel/drivers/infiniband/core/ib_uverbs.ko
> kernel/drivers/infiniband/core/iw_cm.ko
> kernel/drivers/infiniband/core/ib_mad.ko
> kernel/drivers/infiniband/ulp/ipoib/ib_ipoib.ko
> kernel/drivers/infiniband/ulp/srp/ib_srp.ko
> 
> By default, nothing from the infiniband directory is included. The
> question is: What is the right thing to do? Should everything from
> kernel/drivers/infiniband/hw be included in the initrd by default?

That largely depends on what you want your initramfs to be capable of.
In dracut speak, an initramfs is either generic or host_only.  A generic
initramfs should be able to start any system and is suitable for things
like an installer image.  In that case, the answer is yes, you want
everything (you need the whole kit and caboodle to support root over
iSER, SRP, or NFSoRDMA, or to use an IPoIB interface as your install
source).  If you want a host_only initramfs, then you have to sort
through what's required to get to your rootfs.  If you have a network
rootfs, then the requirements jump up considerably.  If you don't, and
you can mount locally, then you only need network drivers if you want a
backup in case your rootfs craps out on you and you need to be able to
ssh in/out or perform other extraordinary recovery measures.  But if you
want to support those extraordinary recovery measures, then you are back
to a good portion of the stack because you might need IPoIB to get
anything done.


-- 
Doug Ledford <dledford@xxxxxxxxxx>
    GPG Key ID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux