On 7/23/19 18:00, Lennart Poettering wrote: > > Do you have some profiler results about this? i.e. what exactly is the > time spent on? I will probably try to do some 'real' study of this problem by using perf or other tool. So far all I know is that the device enumeration (i.e. device_enumerate() function in src/core/device) takes around 100ms on my arm devices. As I noted before, around 80 devices are enumerated. > > [...] > > Hmm, so some people appear to use this, since we recently fixed a bug > in this area that people noticed while making us of this... Of course, someone can use it and it seems reasonable to have the ability for device units in user session. I would argue, however, that having the same set of devices processed for both 'worlds' is sub-optimal. Why not have separate tag in udev for 'user' devices, that would be enumerated by 'systemd --user'? > >> So here is the question: is this a safe thing to do? I wonder if trying >> to start units without having device units created would break something >> in systemd. > > Well, the work needs to be done anyway, so what do you gain if you do > it a bit later? The same thing that we already get for starting units: the ability to do that in parallel with other things. > > What specifically do you try to optimize? latency until the first > process is started by systemd --user? I think the main goal is starting all units in user session as fast as possible. Thanks, Paweł Szewczyk _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel