udevadm --settle

DJ Lucas dj at linuxfromscratch.org
Wed May 11 20:26:39 PDT 2011

After updating from udev-165 to udev-168, I ran into a timing issue with settle using tmpfs for /dev. My swap partition failed to mount because the device node was not present. No other changes than those made to the bootscripts and FS layout to account for /run. I rebooted a few more times to see that the problem was consistent. One other variable is that I'm using new bootscripts (which _should_ provide a very minimal speed increase), but order is the same as stock LFS.

Following a hint I found on a Debian mailing list claiming that devtmpfs was faster, I enabled devtmpfs, commented out the /dev mount in the udev script, and sure enough, the problem resolved itself.

Now, that said, I'm probably a bit of a minority with so many partitions on my disks and this surely has some weight, however,the results are consistantly reproducable on my system. Why settle is not doing what it is intended to do is beyond me. We are only discussing a very small amount of time, a few ms at best here, so I see a couple of options:

1. The obvious one (at least to me) is to force the use of devtmpfs as upstream has intended, and remove the /dev mount from the udev script.

2. Add a sleep to the end of the udev script (how long?). 

3. Changing bootscript order to put checkfs before swap should give enough time for udev to get the coldplug events handled and written to the tempfs.

4. It is a local issue and my troubleshooting skills are not up to par. ;-)

I'm fairly sure that I've proven #1, and disproven #4. Haven't tested 2 or 3 yet....working on that now. More later.

-- DJ

Additional note: Setclock failed to run the first time, but ran fine for the replay. This also did not happen for 165.
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

This message has been scanned for viruses and
dangerous content, and is believed to be clean.

More information about the lfs-dev mailing list