RE: [ANNOUNCE] udev 0.1 release

From: Perez-Gonzalez, Inaky (inaky.perez-gonzalez@intel.com)
Date: Fri Apr 11 2003 - 17:27:19 EST


> From: Greg KH [mailto:greg@kroah.com]
>
> But I can do a lot to prevent losses. A lot of people around here point
> to the old way PTX used to regenerate the device naming database on the
> fly. We could do that by periodically scanning sysfs to make sure we
> are keeping /dev in sync with what the system has physically present.
> That's one way, I'm sure there are others.

This might be a tad over-simplification, but sysfs knows by heart when
anything
is modified, because it goes through it's interface. If we only care about,
for example, devices, we could hook up into device_create() [was this the
name?];
line up in a queue all the devices for which an plug/unplug event hasn't
been
delivered to user space and create symlinks in /sysfs/hotplug-events/.

Each entry in there is a symlink to the new device directory, named with an
increasing integer for easy serialization. When the event is fully
processed,
remove the entry from user space.

To avoid having to scan huge directories, it could be moved to have a single
file, event. When present, it means there are events available. It
represents
the head of the in-kernel event queue. Read it [or read the symlink] for
getting
the event information. If you remove it, that means the event is delivered.
If there is an event in the queue, the file is created again for that event.

Enhance it by creating another file for out-of-band events if needed ...

Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own
(and my fault)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 15 2003 - 22:00:25 EST