Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(drm): group dracut_instmods calls
This module loops over many bus devices, and calls `dracut_instmods` for each one. E.g., on a Lenovo Thinkpad laptop: ``` > for i in /sys/bus/{pci/devices,platform/devices,virtio/devices,soc/devices/soc?,vmbus/devices}/*/modalias; do [[ -e $i ]] && [[ -n $(< "$i") ]] && echo $i; done | wc -l 79 ``` Every call to `dracut_instmods` spawns a `dracut-install` process, which in the previous example means calling `dracut-install` 79 times using the same arguments. If any call to `dracut-install` fails, dracut continues its execution (even the errors are not shown, because it's called with `--silent`). Therefore, let's take the contents of all the `modalias` files into an array and call `dracut-install` only once, adding also the `-o` argument, so if any of the modules cannot be installed, `dracut-install` does not stop. (Cherry picked from commit 80f2caf) Resolves: rhbz#2172269
- Loading branch information