Gentoo Archives: gentoo-dev

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Stability of /sys api
Date: Tue, 15 May 2012 22:39:48
Message-Id: 20120515223805.GA1997@waltdnes.org
In Reply to: Re: [gentoo-dev] Stability of /sys api by Greg KH
On Tue, May 15, 2012 at 11:26:03AM -0700, Greg KH wrote
> On Tue, May 15, 2012 at 01:55:23AM -0400, Walter Dnes wrote: > > > > After some more Google-searching. it looks like the "official > > channels" way is via /etc/mdev.conf. Note that this is on a system with > > busybox[mdev] and no udev. /etc/mdev.conf has a rudimentary set of > > "mdev rules" abilities, and most importantly, it can also call external > > executables (scripts/programs/whatever). On my mdev based machines... > > > > $ cat /proc/sys/kernel/hotplug > > /sbin/mdev > > Oh my, don't do that. Please. It will slow your machine down, and on > some systems, and devices, cause fork-bombs causing your box to come to > a crawl and potentially die. There's also ordering issues that the > called program needs to resolve to get things right that add lots of > logic and slowdowns at times. I really want to get rid of that entry > and option from the kernel entirely, but need to keep it due to legacy > systems and API issues. > > But really, don't do that, it's not a good idea at all.
During bootup, mdev is invoked as "mdev -s", and in hotplug mode it's simply "mdev". In hotplug mode, mdev returns some environmental variables, specifically "ACTION", which are not returned by "mdev -s". Any scripts launched by mdev can easily figure out whether they've been called at bootup or in response to a hotplug event, and act accordingly. A Google search turns up many hits about instructions for automounting under mdev, and it appears relatively easy.
> What specifically is your objection to udev today? Is it doing things > you don't like? Too big? Something else?
Today, it requires an initramfs if /usr is not physically on /. That is due in large part to the fact that it has been rolled into the systemd tarball, and inherited some of systemd's code and limitations, despite the fact that udev is still a separate binary. That's today. How long before it becomes part of the systemd binary? -- Walter Dnes <waltdnes@××××××××.org>

Replies

Subject Author
Re: [gentoo-dev] Stability of /sys api Stelian Ionescu <sionescu@××××.org>