mlx4 module always loaded, despite being on blacklists?

I'm currently installing a server with 13.2-RELEASE, that has a Mellanox ConnectX3 on board, which is not needed in this setup. To see if I can save some Watts (that server ends up at a colocation where we pay per kWh), I'd like to have it disabled via hw.pci.do_power_nodriver=3 in /boot/loader.conf and not loading it's driver (mlx4).
I have already added module_blacklist="mlx4" to /boot/loader.conf and devmatch_blacklist="mlx4" to /etc/rc.conf, yet mlx4_core is always loaded at boot and can't be unloaded via kldunload (i.e. it immediately gets loaded again).

Do those mechanisms ignore/don't work for compiled-in kernel modules? How can one prevent them from loading anyways (other than building your own kernel)?
 
Why not add mlx4_core to the blacklist too?

Do those mechanisms ignore/don't work for compiled-in kernel modules?
You can't unload modules that are statically linked in the kernel. That said, as far as I can tell only mlx5 is in GENERIC, not mlx4.
 
Why not add mlx4_core to the blacklist too?
already tried to add that too, in fact the list contained "mlx mlx4 mlx4_core", but with the same result. The module gets loaded anyways and when I kldunload mlx it instantly gets re-loaded (by what?).

I've renamed the mlx.ko and mlx4.ko modules for now. This saves another ~2W to give me a current draw of 41-42W on that node - does'nt sound as much, but yet another ~10eur savings per year.
 
I have already added module_blacklist="mlx4" to /boot/loader.conf and devmatch_blacklist="mlx4" to /etc/rc.conf, yet mlx4_core is always loaded at boot [...]
Have you tried devmatch_blocklist? rc.conf(5)-13.2-RELEASE:
Code:
       devmatch_blocklist
		   (str) A whitespace-separated	list of	kernel modules	to  be
		   ignored by devmatch(8).

       devmatch_blacklist
		   (str)  This variable is deprecated.	Use devmatch_blocklist
		   instead.  A whitespace-separated list of kernel modules  to
		   be ignored by devmatch(8).
 
Have you tried devmatch_blocklist? rc.conf(5)-13.2-RELEASE:
Code:
       devmatch_blocklist
           (str) A whitespace-separated    list of    kernel modules    to  be
           ignored by devmatch(8).

       devmatch_blacklist
           (str)  This variable is deprecated.    Use devmatch_blocklist
           instead.  A whitespace-separated list of kernel modules  to
           be ignored by devmatch(8).

yes, tried both even if those are aliases for the exact same thing. no idea why a second one got introduced though, the commit also doesn't give any explanation: https://cgit.freebsd.org/src/commit/?id=c43b0081faab742eb93c3d064b552b65f926b86e
 
[...] no idea why a second one got introduced though, the commit also doesn't give any explanation: https://cgit.freebsd.org/src/commit/?id=c43b0081faab742eb93c3d064b552b65f926b86e
The only hint I could find was in the reference linking it to the same devmatch_blocklist in kenv(1); rc.conf(5)-14.0-RELEASE:
Code:
       devmatch_blocklist
		   (str) A whitespace-separated	list of	kernel modules	to  be
		   ignored   by	  devmatch(8).	  In   addition,  the  kenv(1)
		   devmatch_blocklist is appended to this  variable  to	 allow
		   disabling  of  devmatch(8)  loaded  modules	from  the boot
		   loader.

       devmatch_blacklist
		   (str) This variable is deprecated.  Use  devmatch_blocklist
		   instead.   A	whitespace-separated list of kernel modules to
		   be ignored by devmatch(8).
 
Back
Top