Bryan Kadzban wrote: > Armin K. wrote: > At least one settle call is required before checking the filesystems, > because /etc/fstab probably refers to persistent device symlinks (if > not, you're asking for problems when the kernel decides to discover your > disks in a different order), and those symlinks don't exist before udevd > handles the event for the disk/partition/whatever-it-is. So without a > settle call, the checkfs script will probably die. > > It also helps with network renaming since we're still doing that, or > some other form of network persistence like the crazy findif script I > put together a while back and then never put into the contrib/ directory > anywhere. (Because the data used to find NICs might not be in the udev > db, or the names might have been assigned backwards.) Not an issue if > you only have one NIC of course. > >> I don't think that you should disable it by default. But you can give >> users a choice. Introduce new variable in rc.site that can allow someone >> to enable/disable udevadm settle command, but enable it by default in >> init script. Of course, make it possible to override the var. I guess >> that would be fair for everyone. > > This sounds fine I think.
I've been doing a little more experimentation. For shutdown, I can eliminate delays in both init and sendsignals. I've also removed an unneeded sleep in killproc. For init, I changed inittab to read: ca:12345:ctrlaltdel:/sbin/shutdown -t0 -f -r now For sendsignals, I set rc.site's KILLDELAY=0 My first script seems to start as soon as I hit C-A-D and the time from K30dbus to mountfs in run level 6 is: K30dbus seconds 28.421009102 sendsignals seconds 30.135984349 mountfs seconds 30.173835712 I can't instrument beyond mountfs, but the last instruction in S99reboot is 'reboot -d -f -i'. That seems to delay a second or two before the system hw kicks into the reboot process. Let's say 4 seconds for shutdown from C-A-D to actual power change in the hw. Not bad. Then I have 5 seconds or so for the bios to do it's thing and I get the GRUB prompt. The kernel starts coming up and at about 6 seconds, according to dmesg, my partitions are starting to mount. The last line in dmesg is [ 8.235332] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready I have made some optimizations to the boot scripts. First the -f in the shutdown procedure in C-A-D sets /fastboot. This skips the fsck. I added a variable to rc.site, OMIT_UDEV_RETRY_SETTLE=yes, to skip 'udevadm settle' in udev_retry. I also skip trying to clean /tmp with the SKIPTMPCLEAN=y setting. The boot log shows: 21:40:45.697390854 +00:00 (none) Mounting virtual file systems ... 21:40:49.715576147 +00:00 blfs Starting SSH Server... That's 4.02 seconds in the scripts and 8.2 seconds total for boot. Seems pretty quick to me. I'll note that there was one other delay of 2-3 seconds when the system was checking the DVD drive. I was able to remove that by disabling it in the BIOS. Of course I don't have it available and will need to re-enable it when I need it as a part of a reboot. It's not used a lot. I'll be updating the boot scripts in the next day or so to add these options and a new text section: 7.12.1 - Optimizing Boot and Shutdown Scripts. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page