Skip to contentSkip to conversation

documentation: make it clear that sysfs is optional

PATCH In review Randy Dunlap 4 participants 8 messages Jul 27, 2009 – Aug 1, 2009 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 documentation: make it clear that sysfs is optional

From: Lucian Adrian Grijincu <[email protected]>
Subject: [PATCH] documentation: make it clear that sysfs is optional

The original text suggested that sysfs is mandatory and always compiled in the kernel.

---
 Documentation/filesystems/sysfs.txt |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/filesystems/sysfs.txt +2 -1
@@ -23,7 +23,8 @@ interface. 
 Using sysfs
 ~~~~~~~~~~~
 
-sysfs is always compiled in. You can access it by doing:
+sysfs is always compiled in if CONFIG_SYSFS is defined. You can access
+it by doing:
 
     mount -t sysfs sysfs /sys 
 

---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/

#1 lore raw
Quoted 5 lines · Randy Dunlap

From: Lucian Adrian Grijincu <[email protected]>
Subject: [PATCH] documentation: make it clear that sysfs is optional

The original text suggested that sysfs is mandatory and always compiled in the kernel.

But it should be :)

Seriously, who turns sysfs off these days, does anyone? If so, why?

thanks,

greg k-h

#2 lore raw
Quoted 8 lines · On Mon, 27 Jul 2009 09:10:33 -0700 Greg KH wrote:
Quoted 5 lines · Randy Dunlap

From: Lucian Adrian Grijincu <[email protected]>
Subject: [PATCH] documentation: make it clear that sysfs is optional

The original text suggested that sysfs is mandatory and always compiled in the kernel.

But it should be :)

Well, you have the option of making it non-optional.

Quoted 1 line

Seriously, who turns sysfs off these days, does anyone? If so, why?

Why is it configurable then?

---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/

#3 lore raw
Quoted 9 lines · Randy Dunlap
Quoted 7 lines · On Mon, 27 Jul 2009 09:10:33 -0700 Greg KH wrote:
Quoted 5 lines · Randy Dunlap

From: Lucian Adrian Grijincu <[email protected]>
Subject: [PATCH] documentation: make it clear that sysfs is optional

The original text suggested that sysfs is mandatory and always compiled in the kernel.

Quoted 8 lines
Quoted 1 line

But it should be :)

Well, you have the option of making it non-optional.

Quoted 1 line

Seriously, who turns sysfs off these days, does anyone? If so, why?

Why is it configurable then?

Probably the same reason /proc is configurable. No one ever turns it off, but hey, it's possible :)

thanks,

greg k-h

#4 lore raw
Quoted 8 lines · Greg KH
Quoted 7 lines · Randy Dunlap
Quoted 5 lines · On Mon, 27 Jul 2009 09:10:33 -0700 Greg KH wrote:
Quoted 2 lines · Randy Dunlap

The original text suggested that sysfs is mandatory and always compiled in the kernel.

But it should be :)

Quoted 8 lines
Quoted 5 lines

Well, you have the option of making it non-optional.

Quoted 1 line

Seriously, who turns sysfs off these days, does anyone? If so, why?

Why is it configurable then?

Probably the same reason /proc is configurable. No one ever turns it off, but hey, it's possible :)

But does anyone ever test if the system doesn't go to lunch when you do that?

Signature · 4 lines
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
#5 lore raw
Quoted 13 lines · Henrique de Moraes Holschuh
Quoted 12 lines · Greg KH
Quoted 11 lines · Randy Dunlap
Quoted 5 lines · On Mon, 27 Jul 2009 09:10:33 -0700 Greg KH wrote:
Quoted 2 lines · Randy Dunlap

The original text suggested that sysfs is mandatory and always compiled in the kernel.

But it should be :)

Well, you have the option of making it non-optional.

Quoted 1 line

Seriously, who turns sysfs off these days, does anyone? If so, why?

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Why is it configurable then?

Probably the same reason /proc is configurable. No one ever turns it off, but hey, it's possible :)

But does anyone ever test if the system doesn't go to lunch when you do that?

I have no idea, I doubt it...

#6 lore raw
In reply to Greg KH
Quoted 2 lines · Greg KH

Probably the same reason /proc is configurable. No one ever turns it off, but hey, it's possible :)

Hm, it seems as we cannot turn off PROC_FS or SYSFS any more. At least on my system a "make allnoconfig" still selects both. While PROC_FS still shows up under Filesystems->Pseudo-Filesystem (but cannot be turned off), I don't see a menuconfig knob to turn off SYSFS.
However, "make allnoconfig" still selects quite a few options anyway:

# uname -m
x86_64
# make allnoconfig
# grep -c =y .config
175

(manually editing .config gets reverted on another "make config").

So, it loks like SYSFS is just one of the things needed to build a kernel, along with the ~170 other things, at least on x86_64. Is this "make it clear that sysfs is optional" patch still valid? :-)

Christian.

sid$ find . -name Kconfig | xargs grep SYSFS | egrep -v 'drivers/|fs/|net/'
./arch/arm/mach-pxa/Kconfig: select GPIO_SYSFS
./arch/powerpc/kvm/Kconfig: depends on KVM && MARKERS && SYSFS
./arch/x86/kvm/Kconfig: depends on KVM && SYSFS ./init/Kconfig:config SYSFS_DEPRECATED
./init/Kconfig:config SYSFS_DEPRECATED_V2
./init/Kconfig: depends on SYSFS
./init/Kconfig: select SYSFS_DEPRECATED
./init/Kconfig: depends on SLUB && SYSFS
./kernel/trace/Kconfig: depends on SYSFS
./security/Kconfig: depends on SYSFS

Signature · 3 lines
BOFH excuse #228:

That function is not currently supported, but Bill Gates assures us it will be featured in the next upgrade.
#7 lore raw
Quoted 16 lines · On Sat, 1 Aug 2009 02:14:47 -0700 (PDT) Christian Kujau wrote:
Quoted 2 lines · Greg KH

Probably the same reason /proc is configurable. No one ever turns it off, but hey, it's possible :)

Hm, it seems as we cannot turn off PROC_FS or SYSFS any more. At least on my system a "make allnoconfig" still selects both. While PROC_FS still shows up under Filesystems->Pseudo-Filesystem (but cannot be turned off), I don't see a menuconfig knob to turn off SYSFS.
However, "make allnoconfig" still selects quite a few options anyway:

# uname -m
x86_64
# make allnoconfig
# grep -c =y .config
175
Quoted 5 lines

(manually editing .config gets reverted on another "make config").

So, it loks like SYSFS is just one of the things needed to build a kernel, along with the ~170 other things, at least on x86_64. Is this "make it clear that sysfs is optional" patch still valid? :-)

It's no problem to disable PROC_FS and SYSFS if you first enable CONFIG_EMBEDDED>

Quoted 11 lines

sid$ find . -name Kconfig | xargs grep SYSFS | egrep -v 'drivers/|fs/|net/'
./arch/arm/mach-pxa/Kconfig: select GPIO_SYSFS
./arch/powerpc/kvm/Kconfig: depends on KVM && MARKERS && SYSFS
./arch/x86/kvm/Kconfig: depends on KVM && SYSFS ./init/Kconfig:config SYSFS_DEPRECATED
./init/Kconfig:config SYSFS_DEPRECATED_V2
./init/Kconfig: depends on SYSFS
./init/Kconfig: select SYSFS_DEPRECATED
./init/Kconfig: depends on SLUB && SYSFS
./kernel/trace/Kconfig: depends on SYSFS
./security/Kconfig: depends on SYSFS

---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/