mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
7fd45eec37
This commit add the `-i` option to `udevadm trigger` that force it to match parent devices even if they're excluded from filters. The rationale is that some embedded devices have a huge number of platform devices ( ~ 4k for MX8 ) they are there because they're defined in the device tree but there isn't any action or udev rules associated with them. So at boot a significant time is spend triggering and processing rules for devices that don't produce any effect and we would like to filter them by calling: ``` udevadm trigger --type=device --action=add -s block -s tty ``` instead of the normal ``` udevadm trigger --type=device --action=add ``` so we can use filter to filter out only subsystems for we we know that we have rules in place that do something useful. On the other side action / rules are not triggered until the parent is triggered ( which is part of another subsystem), so the additional option will allows udev to complete the coldplug with only the devices we care. Example on iMX8: .Without the new option ``` root@dev:~# udevadm trigger --dry-run -s block --action=add -v /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0boot0 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0boot1 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p1 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p2 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p3 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p4 ``` .With the new option ``` root@dev:~# udevadm trigger --dry-run -i -s block --action=add -v /sys/devices/platform /sys/devices/platform/bus@5b000000 /sys/devices/platform/bus@5b000000/5b010000.mmc /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0boot0 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0boot1 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p1 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p2 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p3 /sys/devices/platform/bus@5b000000/5b010000.mmc/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p4 ``` Boot time reduction with this is place is ~ 1 second. |
||
---|---|---|
.. | ||
bootctl | ||
busctl | ||
coredumpctl | ||
homectl | ||
hostnamectl | ||
importctl | ||
journalctl | ||
kernel-install | ||
localectl | ||
loginctl | ||
machinectl | ||
meson.build | ||
networkctl | ||
oomctl | ||
portablectl | ||
resolvectl | ||
run0 | ||
systemctl.in | ||
systemd-analyze | ||
systemd-cat | ||
systemd-cgls | ||
systemd-cgtop | ||
systemd-confext | ||
systemd-creds | ||
systemd-cryptenroll | ||
systemd-delta | ||
systemd-detect-virt | ||
systemd-dissect | ||
systemd-id128 | ||
systemd-nspawn | ||
systemd-path | ||
systemd-resolve | ||
systemd-run | ||
systemd-sysext | ||
systemd-vmspawn | ||
systemd-vpick | ||
timedatectl | ||
udevadm |