From 9361401eb7619c033e2394e4f9f6d410d6719ac7 Mon Sep 17 00:00:00 2001 From: David Howells Date: Sat, 30 Sep 2006 20:45:40 +0200 Subject: [PATCH] BLOCK: Make it possible to disable the block layer [try #6] Make it possible to disable the block layer. Not all embedded devices require it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require the block layer to be present. This patch does the following: (*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev support. (*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls an item that uses the block layer. This includes: (*) Block I/O tracing. (*) Disk partition code. (*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS. (*) The SCSI layer. As far as I can tell, even SCSI chardevs use the block layer to do scheduling. Some drivers that use SCSI facilities - such as USB storage - end up disabled indirectly from this. (*) Various block-based device drivers, such as IDE and the old CDROM drivers. (*) MTD blockdev handling and FTL. (*) JFFS - which uses set_bdev_super(), something it could avoid doing by taking a leaf out of JFFS2's book. (*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and linux/elevator.h contingent on CONFIG_BLOCK being set. sector_div() is, however, still used in places, and so is still available. (*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and parts of linux/fs.h. (*) Makes a number of files in fs/ contingent on CONFIG_BLOCK. (*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK. (*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK is not enabled. (*) fs/no-block.c is created to hold out-of-line stubs and things that are required when CONFIG_BLOCK is not set: (*) Default blockdev file operations (to give error ENODEV on opening). (*) Makes some /proc changes: (*) /proc/devices does not list any blockdevs. (*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK. (*) Makes some compat ioctl handling contingent on CONFIG_BLOCK. (*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if given command other than Q_SYNC or if a special device is specified. (*) In init/do_mounts.c, no reference is made to the blockdev routines if CONFIG_BLOCK is not defined. This does not prohibit NFS roots or JFFS2. (*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return error ENOSYS by way of cond_syscall if so). (*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if CONFIG_BLOCK is not set, since they can't then happen. Signed-Off-By: David Howells Signed-off-by: Jens Axboe --- init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'init/Kconfig') diff --git a/init/Kconfig b/init/Kconfig index 4381006dd66..d2eb7a84a26 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -92,7 +92,7 @@ config LOCALVERSION_AUTO config SWAP bool "Support for paging of anonymous memory (swap)" - depends on MMU + depends on MMU && BLOCK default y help This option allows you to choose whether you want to have support -- cgit v1.2.3 From f2443ab6c485701576e9116ee44817e66adafd5a Mon Sep 17 00:00:00 2001 From: Ross Biro Date: Sat, 30 Sep 2006 23:27:25 -0700 Subject: [PATCH] allow /proc/config.gz to be built as a module The driver for /proc/config.gz consumes rather a lot of memory and it is in fact possible to build it as a module. In some ways this is a bit risky, because the .config which is used for compiling kernel/configs.c isn't necessarily the same as the .config which was used to build vmlinux. But OTOH the potential memory savings are decent, and it'd be fairly dumb to build your configs.o with a different .config. Signed-off-by: Andrew Morton Cc: "Randy.Dunlap" Cc: Sam Ravnborg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'init/Kconfig') diff --git a/init/Kconfig b/init/Kconfig index d2eb7a84a26..899e46eec1b 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -202,7 +202,7 @@ config AUDITSYSCALL ensure that INOTIFY is configured. config IKCONFIG - bool "Kernel .config support" + tristate "Kernel .config support" ---help--- This option enables the complete Linux kernel ".config" file contents to be saved in the kernel. It provides documentation -- cgit v1.2.3 From 0847062ad57e6d2d77875104d66f413a89769809 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Sat, 30 Sep 2006 23:28:13 -0700 Subject: [PATCH] fix EMBEDDED + SYSCTL menu SYSCTL should still depend on EMBEDDED. This unbreaks the EMBEDDED menu (from the recent SYSCTL_SYCALL menu option patch). Fix typos in new SYSCTL_SYSCALL menu. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- init/Kconfig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'init/Kconfig') diff --git a/init/Kconfig b/init/Kconfig index 899e46eec1b..d2d72704f87 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -257,6 +257,9 @@ config CC_OPTIMIZE_FOR_SIZE If unsure, say N. +config SYSCTL + bool + menuconfig EMBEDDED bool "Configure standard kernel features (for small systems)" help @@ -272,11 +275,8 @@ config UID16 help This enables the legacy 16-bit UID syscall wrappers. -config SYSCTL - bool - config SYSCTL_SYSCALL - bool "Sysctl syscall support" + bool "Sysctl syscall support" if EMBEDDED default n select SYSCTL ---help--- @@ -285,11 +285,11 @@ config SYSCTL_SYSCALL and use. The interface in /proc/sys is now the primary and what everyone uses. - Nothing has been using the binary sysctl interface for some time + Nothing has been using the binary sysctl interface for some time now so nothing should break if you disable sysctl syscall - support, and you kernel will get marginally smaller. + support, and your kernel will get marginally smaller. - Unless you have an application that uses the sys_syscall interface + Unless you have an application that uses the sys_sysctl interface you should probably say N here. config KALLSYMS -- cgit v1.2.3 From 9acc1853519a0473620d424105f9d49ea5b4e62e Mon Sep 17 00:00:00 2001 From: Jay Lan Date: Sat, 30 Sep 2006 23:28:58 -0700 Subject: [PATCH] csa: Extended system accounting over taskstats Add extended system accounting handling over taskstats interface. A CONFIG_TASK_XACCT flag is created to enable the extended accounting code. Signed-off-by: Jay Lan Cc: Shailabh Nagar Cc: Balbir Singh Cc: Jes Sorensen Cc: Chris Sturtivant Cc: Tony Ernst Cc: Guillaume Thouvenin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- init/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'init/Kconfig') diff --git a/init/Kconfig b/init/Kconfig index d2d72704f87..f7a04d0daf0 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -257,6 +257,15 @@ config CC_OPTIMIZE_FOR_SIZE If unsure, say N. +config TASK_XACCT + bool "Enable extended accounting over taskstats (EXPERIMENTAL)" + depends on TASKSTATS + help + Collect extended task accounting data and send the data + to userland for processing over the taskstats interface. + + Say N if unsure. + config SYSCTL bool -- cgit v1.2.3