[systemd-devel] systemd inquiry

Mark Hounschell markh at compro.net
Tue Apr 10 07:26:09 PDT 2012


On 04/10/2012 09:10 AM, Kay Sievers wrote:
> On Tue, Apr 10, 2012 at 14:36, Mark Hounschell<markh at compro.net>  wrote:
>
>> I am having another issue with an out of kernel "GPL" device driver not
>> being available "on time" so to say. When the kernel discovers this pci card
>> it loads it's kernel module and sets up the card for use. This takes around
>> 15 seconds per card and there is usually 2-3 of them. When the card is up,
>> running, and ready, the kernel module notifies udev who in turn executes a
>> small script that creates 30 or so different device nodes for use with the
>> card.
>
> A bit unrelated to the described specific problem above, but:
>
> We do not support any kernel device driver which does not create the
> device nodes on its own from inside the kernel. Such drivers cause
> problems and will fail for various non-interesting reasons. You really
> must hook up the kernel driver to register the devices with the kernel
> driver-core; it's just a few lines to add.
>

Ya, I've thought about this. We have actually converted all our drivers 
to do this in kernel. This one is actually a 3rd party driver that we've 
had to maintain because the original mfgr no longer does. Even though 
they still make the cards. Anyway, I suspect this type of issue won't 
just go away because of what your saying here so the info that Colin is 
giving is very useful to me and others may also find it useful. For the 
sake of myself I will be attempting to use what Colin has suggested, but 
then also maybe reevaluate fixing up the driver. It just uses so many 
device nodes that I would rather it all be done in user land. Earlier I 
said around 30 device nodes per card but it is actually around 180 per 
card with many different majors and minors. Forcing the kernel module to 
implement this would for sure be a very messy thing.


> Doing mknod() in userspace is just too fragile and does not fit into
> any synchronization logic of udev or systemd, it is not even expected
> to work reliably with these tools.
>

I don't know what you mean by fragile but using mknod in user land has 
been around in the "unix" world forever and I suspect is not likely to 
just disappear from the Linux world just because systemd/udev developers 
don't like it or haven't figured out what to do about it yet.

In any case I understand what you are saying and thanks.

Regards
Mark


More information about the systemd-devel mailing list