Re: device unit files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 11, 2022 at 5:16 PM Elbek Mamajonov <emm.boxinuse@xxxxxxxxx> wrote:
How to track down the lifespan of the device unit file, i.e. the activating state? I have an embedded system where systemd-analyze plot shows that the unit file I am interested in, let’s say dev-mmcpartition.device, takes about 2 seconds to be become active. This partition (mmcpartition) holds my rootfs. I would like to know what is going on during those 2 seconds, what device unit file is doing, how to track what it is doing? Thanks in advance.

Really the only thing a .device unit "does" is wait for udev to report that the corresponding actual device is ready. As soon as udev sends out the uevent with ACTION="" and systemd receives it, the .device unit becomes active, that's all.

So if that's slow, it might be the kernel not sending the initial 'add' event *to* udev (AFAIK, systemd-udev-trigger.service is responsible for triggering fake 'add' events for devices that already exist at boot time, so check where that service shows up on the graph), or it might be udev taking a long time to process its .rules for that device, or systemd not catching up fast enough... Such delays for the mmcblk rootfs seem to be a frequent question both here on the list as well as on IRC, but I don't think I remember any specific answers.

--
Mantas Mikulėnas

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux