Bug ID 1193059
Summary suse-module-tools: split modprobe.conf defaults into multiple files
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Basesystem
Assignee screening-team-bugs@suse.de
Reporter martin.wilck@suse.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

We have moved all default modprobe.conf settings to /usr/lib/modprobe.d now.
This makes it easier for users to override distro defaults by copying .conf
files to /etc/modprobe.d and editing them. 

This is still suboptimal though, because we collect all settings in two big
files, 00-system.conf and 50-blacklist.conf. A user who wants to override a
single setting has to override the entire file, meaning that she won't see
future updates.

It would be much better and much more to the modprobe.d spirit to split the
modprobe.conf files into multiple small files, each for just one module or for
a small collection of closely related modules. This way, users could easily
override the settings for just one module. It's intended that users should be
able to to this, as we are shipping quite a few modules that are blacklisted by
default and would be utterly useless if un-blacklisting them wouldn't be
accepted practice.

With this change, a default modprobe.d directory would look like this:

# ls -l /usr/lib/modprobe.d/
total 204
-rw-r--r-- 1 root root 1298 Nov 22 23:36 10-unsupported-modules.conf
-rw-r--r-- 1 root root   21 Nov 22 23:36 40-alias-autofs.conf
-rw-r--r-- 1 root root   15 Nov 22 23:36 40-alias-nfs.conf
-rw-r--r-- 1 root root   81 Nov 22 23:36 40-alias-paride.conf
-rw-r--r-- 1 root root   34 Nov 22 23:36 40-alias-parport.conf
-rw-r--r-- 1 root root   75 Nov 22 23:36 40-alias-qemu-acpiphp.conf
-rw-r--r-- 1 root root   83 Nov 22 23:36 40-apm.conf
-rw-r--r-- 1 root root  728 Nov 22 23:36 40-bttv_skip_it.conf
-rw-r--r-- 1 root root  134 Nov 22 23:36 40-cifs.conf
-rw-r--r-- 1 root root   63 Nov 22 23:36 40-rtc.conf
-rw-r--r-- 1 root root   87 Nov 22 23:36 40-sonypi.conf
-rw-r--r-- 1 root root   32 Nov 22 23:36 40-toshiba.conf
-rw-r--r-- 1 root root  424 Nov 22 23:36 50-blacklist-acpi_power_meter.conf
-rw-r--r-- 1 root root   41 Nov 22 23:36 50-blacklist-bfusb.conf
-rw-r--r-- 1 root root   78 Nov 22 23:36 50-blacklist-dpt_i2o.conf
-rw-r--r-- 1 root root  175 Nov 22 23:36 50-blacklist-evbug.conf
-rw-r--r-- 1 root root 1477 Nov 22 23:36 50-blacklist-fb.conf
-rw-r--r-- 1 root root  131 Nov 22 23:36 50-blacklist-mtd.conf
-rw-r--r-- 1 root root  230 Nov 22 23:36 50-blacklist-pata_acpi.conf
-rw-r--r-- 1 root root   87 Nov 22 23:36 50-blacklist-snd_bt87x.conf
-rw-r--r-- 1 root root   81 Nov 22 23:36 50-blacklist-usbcore.conf
-rw-r--r-- 1 root root  183 Nov 22 23:36 50-blacklist-xircom.conf
-rw-r--r-- 1 root root  421 Nov 22 23:38 60-blacklist_fs-adfs.conf
-rw-r--r-- 1 root root  421 Nov 22 23:38 60-blacklist_fs-affs.conf
-rw-r--r-- 1 root root  421 Nov 22 23:38 60-blacklist_fs-befs.conf
-rw-r--r-- 1 root root  415 Nov 22 23:38 60-blacklist_fs-bfs.conf
-rw-r--r-- 1 root root  433 Nov 22 23:38 60-blacklist_fs-cramfs.conf
-rw-r--r-- 1 root root  415 Nov 22 23:38 60-blacklist_fs-efs.conf
-rw-r--r-- 1 root root  427 Nov 22 23:38 60-blacklist_fs-erofs.conf
-rw-r--r-- 1 root root  427 Nov 22 23:38 60-blacklist_fs-exofs.conf
-rw-r--r-- 1 root root  445 Nov 22 23:38 60-blacklist_fs-freevxfs.conf
-rw-r--r-- 1 root root  415 Nov 22 23:38 60-blacklist_fs-hfs.conf
-rw-r--r-- 1 root root  421 Nov 22 23:38 60-blacklist_fs-hpfs.conf
-rw-r--r-- 1 root root  415 Nov 22 23:38 60-blacklist_fs-jfs.conf
-rw-r--r-- 1 root root  427 Nov 22 23:38 60-blacklist_fs-minix.conf
-rw-r--r-- 1 root root  433 Nov 22 23:38 60-blacklist_fs-nilfs2.conf
-rw-r--r-- 1 root root  421 Nov 22 23:38 60-blacklist_fs-ntfs.conf
-rw-r--r-- 1 root root  421 Nov 22 23:38 60-blacklist_fs-omfs.conf
-rw-r--r-- 1 root root  421 Nov 22 23:38 60-blacklist_fs-qnx4.conf
-rw-r--r-- 1 root root  421 Nov 22 23:38 60-blacklist_fs-qnx6.conf
-rw-r--r-- 1 root root  421 Nov 22 23:38 60-blacklist_fs-sysv.conf
-rw-r--r-- 1 root root  415 Nov 22 23:38 60-blacklist_fs-ufs.conf
-rw-r--r-- 1 root root   69 Nov 22 23:36 70-softdep-ata_piix.conf
-rw-r--r-- 1 root root  102 Nov 22 23:36 70-softdep-csiostor.conf
-rw-r--r-- 1 root root   54 Nov 22 23:36 70-softdep-dm_crypt.conf
-rw-r--r-- 1 root root  163 Nov 22 23:36 70-softdep-ehci_hcd.conf
-rw-r--r-- 1 root root  170 Nov 22 23:36 70-softdep-usb_storage.conf
-rw-r--r-- 1 root root  117 Nov 22 23:36 80-options-ch.conf
-rw-r--r-- 1 root root  306 Oct 15 14:09 README
-rw-r--r-- 1 root root  158 Oct 11 17:05 firewalld-sysctls.conf
-rw-r--r-- 1 root root  773 Oct 15 14:09 systemd.conf

Un-blacklisting a single entry is now as easy as doing e.g. "ln -s /dev/null
/etc/modprobe.d/50-blacklist-snd_bt87x.conf". This is the same technique used
e.g. by udev or systemd to override system defaults.

The change has one disadvantage though - kmod operations will be slower,
because reading many small files takes more time than reading one big file. The
time for reading all conf files (standard TW installation, x86_64, SATA SSD)
is:

Before: with cold page cache: 34.6 ms, hot cache: 11.8 ms
After:  with cold page cache: 41.3 ms, hot cache: 14.7 ms

The entire modprobe operation typically takes 200-300 ms on the same system.
Note that some modprobe.conf files are already shipped in "split" fashion, in
particular the file system blacklist files like 60-blacklist_fs-hpfs.conf,
and some modprobe.d files that are shipped in other packages.

With 200 modules loaded after boot and no paralellism, this could slow down
system boot by up to 500-1000 ms. The question is whether this would be an
acceptable price to pay for better customizability and cleaner configuration.


You are receiving this mail because: