Skip to content

Replace copy_modules_dir by manual_add_modules calls

dracut-install can act on kernel subdirs directly. This has no measurable effect on the runtime.

Benchmark results

Benchmark on my desktop machine with an AMD Ryzen 7 5700G in a tmpfs chroot with Debian unstable on 2024-06-02. initramfs-tools 0.143 from experimental:

$ schroot-wrapper -p initramfs-tools=0.143,initramfs-tools-core=0.143,linux-image-generic,firmware-linux,zstd,cryptsetup-initramfs,lvm2,kbd,mdadm,ntfs-3g,plymouth,console-setup,hyperfine -u root -c unstable
(unstable)root@desktop:~# hyperfine "update-initramfs -u"
Benchmark 1: update-initramfs -u
  Time (mean ± σ):     11.255 s ±  0.026 s    [User: 12.467 s, System: 5.728 s]
  Range (min … max):   11.194 s … 11.282 s    10 runs

This commit is within the margin of error:

$ schroot-wrapper -p ../initramfs-tools_0.143_all.deb,../initramfs-tools-core_0.143_all.deb,linux-image-generic,firmware-linux,zstd,cryptsetup-initramfs,lvm2,kbd,mdadm,ntfs-3g,plymouth,console-setup,hyperfine -u root -c unstable
(unstable)root@desktop:~# hyperfine "update-initramfs -u"
Benchmark 1: update-initramfs -u
  Time (mean ± σ):     11.248 s ±  0.031 s    [User: 12.705 s, System: 5.698 s]
  Range (min … max):   11.209 s … 11.304 s    10 runs

Benchmark on a Raspberry Pi Zero 2W with Debian unstable on 2024-06-02. initramfs-tools 0.143 from experimental:

$ schroot-wrapper -p initramfs-tools=0.143,initramfs-tools-core=0.143,linux-image-generic,firmware-linux,zstd,cryptsetup-initramfs,lvm2,kbd,mdadm,ntfs-3g,plymouth,console-setup,hyperfine -u root -c unstable
(unstable)root@zero2w:~# hyperfine -r 10 "update-initramfs -u"
Benchmark 1: update-initramfs -u
  Time (mean ± σ):     206.167 s ±  4.261 s    [User: 53.232 s, System: 112.503 s]
  Range (min … max):   199.821 s … 210.960 s    10 runs

This commit is within the margin of error:

(unstable)root@zero2w:~# hyperfine -r 10 "update-initramfs -u"
Benchmark 1: update-initramfs -u
  Time (mean ± σ):     203.379 s ±  4.541 s    [User: 53.187 s, System: 109.325 s]
  Range (min … max):   197.522 s … 213.103 s    10 runs
Edited by Benjamin Drung

Merge request reports

Loading