DragonFly BSD
DragonFly kernel List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: sysfs -> /sbin/hotplug -> udev

From: esmith <esmith@xxxxxxxxxxxx>
Date: Fri, 23 Apr 2004 00:18:11 -0400

Joerg Sonnenberger wrote:

On Thu, Apr 22, 2004 at 02:41:24AM -0400, esmith wrote:

A quick FYI for anyone who is interested

sysfs -> /sbin/hotplug -> udev

[skip sysfs explanation]

We don't really have the need for sysfs, since most information in 2.6's
/sys is already in the sysctl space visible. What is needed for plugging
is some generic event notification. Without having coded anything, it
should be possible to do most of this in device_probe / device_attach for all
devices and perhaps in if_attach specially for network devices.


DF may not "need" sysfs but, wouldn't it be convenient to have?

The author of sysfs, Pat Mochel wrote:

esmith wrote:

>> Those are good reasons for using a pseudo-filesystem to present a
>> window, or view, into the state of the kobjects but doesn't sysctl
>> already provide this type of window into kobjects? Please explain how
>> sysctl and sysfs are different and what makes sysfs superior.

sysctls are not tied to any object. While there are groups of sysctls for various subsystems, they are no rigid semantics for binding them together. sysctls, at least in Linux, are a bit of a pain to add, and from a maintainence standpoint, don't scale (There are large static lists in a couple of files somewhere). You also can't add them dynamically (like when a device is inserted or a module is loaded). There is easy way to add a per-object sysctl, for a dynamic number of objects. And, there is no built-in protection mechanism for the objects when reading/writing sysctls.

kobjects and sysfs provide all of those things, so not only is it handy,
it's far superior in many ways. :)


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]