udev init script should not explicitly call udev-settle Instead, the settle part should be split out into a new script called udev-settle which provides dev-settle. Other init scripts that need this (such as net.lo, lvm, raid, etc) can depend on it. With dhcpcd having a udev plugin and no net.lo, lvm, raid, etc, there is no need to run udev-settle which makes the system boot a lot lot faster.
You are propably right. However, I don't trust our maintainers to know when udev-settle should be added to init script depends. Some blog post, information page, something that would cover the cases when they need to do that, like roadmap, should be created before we just rip the udev settle out from the udev init script. ML post, wiki page, whatever, to inform maintainers/packagers/users.
Is there a reason why these maintainers cannot be added to this bug to co-ordinate or are you just going to let this rot?
Created attachment 388458 [details, diff] 0001-remove-call-to-udevadm-settle.patch This patch removes the call to udevadm settle completely. Before I write another script that provides this, I would like to have some folks test without the call and let me know if things break. Thanks, William
Looking further at how upstream does this, there are separate services to coldplug, and to handle settling, so I am looking into mirroring that.
(In reply to William Hubbs from comment #3) > Created attachment 388458 [details, diff] [details, diff] > 0001-remove-call-to-udevadm-settle.patch > > This patch removes the call to udevadm settle completely. > Before I write another script that provides this, I would like to have > some folks test without the call and let me know if things break. I've been running the same patch for over a month without issue.
(In reply to William Hubbs from comment #4) > Looking further at how upstream does this, there are separate services > to coldplug, and to handle settling, so I am looking into mirroring > that. It looks like systemd does not run udevadm settle by default. There is a unit called systemd-udev-settle.service, but nothing activates it in a default configuration. It also contains the following comment: # This service can dynamically be pulled-in by legacy services which # cannot reliably cope with dynamic device configurations, and wrongfully # expect a populated /dev during bootup.
This is fixed in commit ebb3f35. It will be part of udev-init-scripts 28.
(In reply to Roy Marples from comment #0) > udev init script should not explicitly call udev-settle > > Instead, the settle part should be split out into a new script called > udev-settle which provides dev-settle. Other init scripts that need this > (such as net.lo, lvm, raid, etc) can depend on it. > > With dhcpcd having a udev plugin and no net.lo, lvm, raid, etc, there is no > need to run udev-settle which makes the system boot a lot lot faster. If udevadm settle is slow, we should profile it to understand why. That said, I am okay with this idea, although not in the way commit ebb3f35 did it. Now we have three scripts for udevd, udevadm trigger and udevadm settle respectively. udevadm settle is not run by default and there is plenty of breakage. (In reply to William Hubbs from comment #7) > This is fixed in commit ebb3f35. > It will be part of udev-init-scripts 28. This broke alsasound, localmount (when /dev/disk is used), etcetera. It is also going to break ZFSOnLinux 0.6.5 when it is released because it is being fixed to depend on udev.
> If udevadm settle is slow, we should profile it to understand why. It's slow because it takes the kernel a while to enumerate all of the hardware on a given system. Many system services can be started before this, but udev-settle prevents that.
(In reply to Mike Gilbert from comment #9) > > If udevadm settle is slow, we should profile it to understand why. > > It's slow because it takes the kernel a while to enumerate all of the > hardware on a given system. Many system services can be started before this, > but udev-settle prevents that. Enumeration on my systems is fast. I wonder what the difference between the two are. My systems have kernels built by genkernel HEAD.
(In reply to Richard Yao from comment #10) Sorry, I mean initialization. For example, on one of my systems, the network interfaces are not ready for several seconds after udevd starts.
Richard, hdd maybe? I recall udev being terribly slow at detecting partition tables on non-SSD.
(In reply to Richard Yao from comment #8) > (In reply to Roy Marples from comment #0) > > udev init script should not explicitly call udev-settle > > > > Instead, the settle part should be split out into a new script called > > udev-settle which provides dev-settle. Other init scripts that need this > > (such as net.lo, lvm, raid, etc) can depend on it. > > > > With dhcpcd having a udev plugin and no net.lo, lvm, raid, etc, there is no > > need to run udev-settle which makes the system boot a lot lot faster. > > If udevadm settle is slow, we should profile it to understand why. > > That said, I am okay with this idea, although not in the way commit ebb3f35 > did it. Now we have three scripts for udevd, udevadm trigger and udevadm > settle respectively. udevadm settle is not run by default and there is > plenty of breakage. > > (In reply to William Hubbs from comment #7) > > This is fixed in commit ebb3f35. > > It will be part of udev-init-scripts 28. > > This broke alsasound, localmount (when /dev/disk is used), etcetera. It is > also going to break ZFSOnLinux 0.6.5 when it is released because it is being > fixed to depend on udev. From what I've read about localmount, we are supposed to be using labels in the filesystems nowadays instead of using full paths in /dev. The following is from the default fstab: # NOTE: You can use full paths to devices like /dev/sda3, but nowadays it is # recommended to set labels in the filesystem and mount via that. All # modern Linux filesystems should support this functionality. If your # boot partition is /dev/sda1 and is ext4, you can set the label of it # to "boot" by running: # # e2label /dev/sda1 boot # Then the LABEL example below will work for you. LABEL=boot /boot ext4 noauto,noatime 1 2 LABEL=root / ext4 noatime 0 1 LABEL=swap none swap sw 0 0 Does this solve the localmount issue? I'm as guilty as anyone; I haven't switched to this yet myself.