Can mdev replace udev in an ordinary linux distro?

Laurent Bercot ska-dietlibc at skarnet.org
Thu Sep 22 15:24:58 UTC 2011


> For more info see: <http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken>.

 No.
 Anything on freedesktop.org, and *especially* from the systemd guys,
is worth linking to for more information. It is incredibly biased
towards huge desktop systems and behemoth software; it is full of
bad engineering decisions and (voluntary or involuntary) ignorance
as far as smaller systems are concerned.

 The reality about /usr is that there is *no reason at all* why a
separate /usr should be broken; historically, a lot of systems DID
have a separate /usr, and that is the very reason why /usr is indeed
separate: when mass storage was scarce and expensive, big networked
installations had a NFS-mounted /usr, and / contained the necessary
software to boot up to the point where /usr could be mounted.

 Unix was actually *designed* to have a separate /usr. So:
 * either the article authors are misinformed
 * or the article authors are dishonest
 * or their distributions (Fedora, Ubuntu...) chose to install critical
software into /usr, which is a mistake
 * or their distributions chose to treat some /usr software as critical
(which is very probable considering they are willing to use a spaghetti
monster as process 1, despite all good engineering practices).

 Please do not refer to freedesktop.org anymore, except as an example
of how not to design software.


> devtmpfs: the reason to use devtmpfs that I have heard is that it
> allows the information about devices that the kernel already has, to
> be used directly rather than figuring it out again in userspace (so
> you do half the work).

 Yes, it does that - without the correct Unix permissions, so some
userspace tweaking is still necessary. It is a half-hearted attempt
at kernel device management, and arbitrarily decides that /dev will
be a tmpfs mounting point (which is not a bad idea in itself, but
the kernel should not decide how users organize their filesystems).
 I'd rather have a full userspace implementation like udev that lets
me mount /dev whenever I want, as the filesystem type I want. I have
done without devtmpfs for years and feel no need to switch.


> It also avoids some race-conditions with node
> creation if nodes are created from userspace.

 Race conditions only happen if userspace helpers are forked in
parallel as the hotplug system does. If userspace helpers are forked
sequentially (which *should* totally be a kernel option), or the
information is sent sequentially to a userspace daemon (like with the
netlink system), there is no race condition.

-- 
 Laurent


More information about the busybox mailing list