[plug] sysfs in 2.5

Tony Breeds magni at plug.linux.org.au
Thu Mar 13 13:25:08 WST 2003


On Wed, Mar 12, 2003 at 08:09:09PM +0800, Jeremy Malcolm wrote:
> On Wed, 12 Mar 2003 03:20:38 +0000, Harry McNally wrote:
> 
> > It was great. Thanks Tony. See you at the next one :-)
> 
> *Damn*, I haven't been checking the PLUG list regularly enough and I
> missed it! :-(  Are there notes up somewhere? 

I will put the HTML version of my slides up, On the night they wern't
complete.  I hope to finish them this weekend, even if I don't I'll put
what I have up for people to look over.

> I did catch the sysfs talk at the conference (do we really need
> another directory off the root?) but I would have liked to hear about
> some of the other new features.

Hmm sysgs is way more than that,

Theere is 0 requirement for sys to be in the root:
balder:/proc# mount -t sysfs none /usr/local/some/really/random/spott
balder:/proc# mount | grep sys
none on /usr/local/some/really/random/spott type sysfs (rw)

But thats just me illustrating a silly point, of course in the real
world the fs needs to be somewhere predicatable but where?

Only time will answer that question.  I wasn't at Pat's talk so forgive
me if I'm telling you stuff that you already know.

sysfs will solve several problems:

1) a _std_ way to run-time configure devices and subsystems:
   /proc/ is _full_ of crap and waaay more complex than it needs to be
   sysfs will (slowly) fix that.  Most of /proc is a connevience, sysfs
   is the solution.

2) devfs, was a nice Idea sysfs will replace it.
   ATM you _can't_ use sysfs to access devices in a device type way BUT
   slowly you will be aable to, then the horid nasty stuff that devfs
   has done to the kernel can be removed.  It's not the devfs itself is
   uncool BUT linking the access and the control of devices is worth it.

   (and you _could_ mount your sysfs on /dev it you want, BUT I don't
   recomend it)

3) Showing how logical and physical devices are plugged into the system.
	/sysfs/devices/pci0/00:1f.1/ide0/0.0/block/dev &&
	/sysfs/block/hda/dev
   Different names for the same thing, in each subdir I can configure
   features of the device.  While it is somewhat counter intuitive not
   all features are available at each point, If you think about it for a
   while this is a good thing.

Sysfs came about as a debigging tool for the larger change in the device
model.  It's a damm cool tool, and a funky new feature to boot!

Yours Tony

        Linux.Conf.AU       http://lca2004.netcraft.com.au/ 
        Jan 12-17 2004      The Australian Linux Technical Conference!



More information about the plug mailing list