mdev race conditions
Mike Frysinger
vapier at gentoo.org
Wed Jun 4 10:32:16 UTC 2008
On Wednesday 04 June 2008, Bernard Blackham wrote:
> On Wed, Jun 04, 2008 at 04:27:31AM -0400, Mike Frysinger wrote:
> > [udev] does a *lot* of stuff that people keep asking to add to mdev.
> > historically i declined anything but the bare min stuff as imo,
> > we're wasting time reinventing a perfectly good wheel.
>
> I'm not asking for features. I just want reliability. If people use
> mdev through /proc/sys/kernel/hotplug as it is currently documented,
> they will hit race conditions 1% of the time which may slip through
> their testing. (Luckily, we're hitting it about 20% of the time
> here).
again, it's all about intentions. mdev was intended to seed /dev and then
just update it on occasion, not be stress tested. a completely reliable
version is a feature imo ;). it also isnt a matter of documentation ... the
whole reason for moving to netlink socket communication is because, by
design, executing a binary per event is racy. adding delays/checks would
mitigate that, not fix it.
> > > I'd like someone to answer my original proposal of whether or not a
> > > simple daemon running in a loop would suffice. I imagine the resulting
> > > binary would be a mere few kilobytes in size, as *all* it needs to do
> > > is serialize requests and pass them to mdev. Nothing more.
> >
> > writing a standalone binary does not fit the busybox design.
>
> Sorry, what I meant to say is that the resulting addition of mdevd
> to the busybox binary would only add a few kilobytes to its size.
and as things are today, your "tiny" addition results in much more overhead
than udevd. busybox is one big blob and every instance of it (regardless of
what applet it's invoking) means a unique instance of that big blog in
memory.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.busybox.net/pipermail/busybox/attachments/20080604/574ec8b5/attachment-0002.pgp
More information about the busybox
mailing list