From e8f80e7509f8e9805da917f0271efb7cce5ad15f Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 27 Sep 2024 09:14:14 +0200 Subject: [PATCH] Disable udev --- JOURNAL.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ lagarto-ox.nix | 4 ++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/JOURNAL.md b/JOURNAL.md index 9f876a4..27d7870 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -4249,3 +4249,48 @@ Not sure which device is malfunctioning. UDEV [1755.665632] add /devices/virtual/tty/ptyaf (tty) UDEV [1759.047259] add /devices/virtual/tty/ptyb0 (tty) +## 2024-09-27 + +Here is the FPGA startup services by duration: + + [root@nixos-riscv:~]# systemd-analyze blame + 3min 59.980s systemd-udev-trigger.service + 2min 6.780s suid-sgid-wrappers.service + 2min 2.677s mount-pstore.service + 1min 46.770s user@0.service + 1min 10.554s systemd-journald.service + 1min 5.538s resolvconf.service + 48.660s systemd-logind.service + 44.747s systemd-sysctl.service + 43.971s sys-fs-fuse-connections.mount + 43.358s dev-mqueue.mount + 43.197s dev-hugepages.mount + 43.043s sys-kernel-debug.mount + 42.959s kmod-static-nodes.service + 42.568s network-setup.service + 42.546s modprobe@configfs.service + 42.285s systemd-tmpfiles-setup-dev-early.service + 40.980s modprobe@efi_pstore.service + 40.510s sys-kernel-config.mount + 39.891s modprobe@fuse.service + 36.103s systemd-random-seed.service + 30.686s systemd-udevd.service + 30.059s systemd-modules-load.service + 29.682s systemd-journal-catalog-update.service + 29.091s systemd-remount-fs.service + 26.090s systemd-tmpfiles-setup.service + 23.570s systemd-journal-flush.service + 21.042s systemd-tmpfiles-setup-dev.service + 19.736s audit.service + 17.794s systemd-update-utmp.service + 15.329s dbus.service + 10.177s modprobe@drm.service + 9.866s systemd-update-done.service + 8.302s user-runtime-dir@0.service + 6.615s systemd-user-sessions.service + 5.384s network-local-commands.service + 4.933s getty@tty1.service + +It doesn't make much sense to have udev on the FPGA, as we are not going to +hotplug anything. Maybe I can just disable the service, and save 4 minutes (at +least). diff --git a/lagarto-ox.nix b/lagarto-ox.nix index 81b181e..7b2d8eb 100644 --- a/lagarto-ox.nix +++ b/lagarto-ox.nix @@ -14,8 +14,8 @@ # We don't need any firmware hardware.firmware = lib.mkForce []; - #services.haveged.enable = true; - #services.jitterentropy-rngd.enable = true; + # No need for udev + services.udev.enable = false; # Prevent executing the nscd program as it seems to hang the CPU system.activationScripts.users = lib.mkForce (