[PATCH] documentation update

Rik van Riel (H.H.vanRiel@phys.uu.nl)
Sun, 23 Aug 1998 13:26:15 +0200 (CEST)


Hi Linus,

the following patch updates the documentation for
linux/Documentation/* and is fully complete as of
2.1.117.

It also updates the MAINTAINERS file, this time without
that controversial line in it ;)

Please apply this for 2.1.118...

Rik.
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+

--- MAINTAINERS.orig Sun Aug 23 13:19:12 1998
+++ MAINTAINERS Sun Aug 23 13:22:29 1998
@@ -367,6 +367,10 @@
L: linux-mac68k@wave.lm.com
S: Maintained

+MEMORY MANAGEMENT:
+W: http://www.phys.uu.nl/~riel/mm-patch/
+L: linux-mm@kvack.org
+
MENUCONFIG:
P: Michael Elizabeth Chastain
M: mec@shout.net
@@ -593,6 +597,12 @@
P: Martin Mares
M: mj@atrey.karlin.mff.cuni.cz
L: linux-video@atrey.karlin.mff.cuni.cz
+S: Maintained
+
+SYSCTL DOCUMENTATION: (except networking)
+P: Rik van Riel
+M: H.H.vanRiel@phys.uu.nl
+W: http://www.phys.uu.nl/~riel/
S: Maintained

SYSV FILESYSTEM
--- Documentation/sysctl/README.orig Wed Jun 24 23:30:07 1998
+++ Documentation/sysctl/README Sun Aug 23 12:34:48 1998
@@ -1,4 +1,4 @@
-Documentation for /proc/sys/*/* version 0.1
+Documentation for /proc/sys/ kernel version 2.1.117
(c) 1998, Rik van Riel <H.H.vanRiel@phys.uu.nl>

'Why', I hear you ask, 'would anyone even _want_ documentation
@@ -58,9 +58,9 @@
debug/ <empty>
dev/ device specific information (eg dev/cdrom/info)
fs/ specific filesystems
+ filehandle, inode, dentry and quota tuning
binfmt_misc <linux/Documentation/binfmt_misc.txt>
kernel/ global kernel info / tuning
- open file / inode tuning
miscellaneous stuff
net/ networking stuff, for documentation look in:
<linux/Documentation/networking/>
--- Documentation/sysctl/fs.txt.orig Tue Aug 11 18:28:56 1998
+++ Documentation/sysctl/fs.txt Sun Aug 23 12:35:49 1998
@@ -0,0 +1,116 @@
+Documentation for /proc/sys/fs/* kernel version 2.1.117
+ (c) 1998, Rik van Riel <H.H.vanRiel@phys.uu.nl>
+
+For general info and legal blurb, please look in README.
+
+==============================================================
+
+This file contains documentation for the sysctl files in
+/proc/sys/fs/ and is valid for Linux kernel version 2.1.
+
+The files in this directory can be used to tune and monitor
+miscellaneous and general things in the operation of the Linux
+kernel. Since some of the files _can_ be used to screw up your
+system, it is advisable to read both documentation and source
+before actually making adjustments.
+
+Currently, these files are in /proc/sys/fs:
+- dentry-state
+- dquot-max
+- dquot-nr
+- file-max
+- file-nr
+- inode-max
+- inode-nr
+- inode-state
+
+Documentation for the files in /proc/sys/fs/binfmt_misc is
+in Documentation/binfmt_misc.txt.
+
+==============================================================
+
+dentry-state:
+
+From linux/fs/dentry.c:
+--------------------------------------------------------------
+struct {
+ int nr_dentry;
+ int nr_unused;
+ int age_limit; /* age in seconds */
+ int want_pages; /* pages requested by system */
+ int dummy[2];
+} dentry_stat = {0, 0, 45, 0,};
+--------------------------------------------------------------
+
+Dentries are dynamically allocated and deallocated, and
+nr_dentry seems to be 0 all the time. Hence it's safe to
+assume that only nr_unused, age_limit and want_pages are
+used. Nr_unused seems to be exactly what its name says.
+Age_limit is the age in seconds after which dcache entries
+can be reclaimed when memory is short and want_pages is
+nonzero when shrink_dcache_pages() has been called and the
+dcache isn't pruned yet.
+
+==============================================================
+
+dquot-max & dquot-nr:
+
+The file dquot-max shows the maximum number of cached disk
+quota entries.
+
+The file dquot-nr shows the number of allocated disk quota
+entries and the number of free disk quota entries.
+
+If the number of free cached disk quotas is very low and
+you have some awesome number of simultaneous system users,
+you might want to raise the limit.
+
+==============================================================
+
+file-max & file-nr:
+
+The kernel allocates file handles dynamically, but as yet it
+doesn't free them again.
+
+The value in file-max denotes the maximum number of file-
+handles that the Linux kernel will allocate. When you get lots
+of error messages about running out of file handles, you might
+want to increase this limit.
+
+The three values in file-nr denote the number of allocated
+file handles, the number of used file handles and the maximum
+number of file handles. When the allocated file handles come
+close to the maximum, but the number of actually used ones is
+far behind, you've encountered a peak in your usage of file
+handles and you don't need to increase the maximum.
+
+==============================================================
+
+inode-max, inode-nr & inode-state:
+
+As with file handles, the kernel allocates the inode structures
+dynamically, but can't free them yet.
+
+The value in inode-max denotes the maximum number of inode
+handlers. This value should be 3-4 times larger than the value
+in file-max, since stdin, stdout and network sockets also
+need an inode struct to handle them. When you regularly run
+out of inodes, you need to increase this value.
+
+The file inode-nr contains the first two items from
+inode-state, so we'll skip to that file...
+
+Inode-state contains three actual numbers and four dummies.
+The actual numbers are, in order of appearance, nr_inodes,
+nr_free_inodes and preshrink.
+
+Nr_inodes stands for the number of inodes the system has
+allocated, this can be slightly more than inode-max because
+Linux allocates them one pageful at a time.
+
+Nr_free_inodes represents the number of free inodes (?) and
+preshrink is nonzero when the nr_inodes > inode-max and the
+system needs to prune the inode list instead of allocating
+more.
+
+
--- Documentation/sysctl/kernel.txt.orig Wed Jun 24 23:30:07 1998
+++ Documentation/sysctl/kernel.txt Sun Aug 23 13:18:04 1998
@@ -1,4 +1,4 @@
-Documentation for /proc/sys/kernel/* version 0.1
+Documentation for /proc/sys/kernel/* kernel version 2.1.117
(c) 1998, Rik van Riel <H.H.vanRiel@phys.uu.nl>

For general info and legal blurb, please look in README.
@@ -14,25 +14,25 @@
system, it is advisable to read both documentation and source
before actually making adjustments.

-Currently, these files are in /proc/sys/kernel:
+These files might (depending on your configuration) show
+up in /proc/sys/kernel:
- ctrl-alt-del
-- dentry-state
- domainname
-- file-max
-- file-nr
- hostname
-- inode-max
-- inode-nr
-- inode-state
+- htab-reclaim [ PPC only ]
+- java-appletviewer [ binfmt_java, obsolete ]
+- java-interpreter [ binfmt_java, obsolete ]
- modprobe ==> Documentation/kmod.txt
- osrelease
- ostype
- panic
+- powersave-nap [ PPC only ]
- printk
-- real-root-dev ==> Documentation/initrd.txt
-- reboot-cmd ==> SPARC specific
-- securelevel
+- real-root-dev ==> Documentation/initrd.txt
+- reboot-cmd [ SPARC only ]
+- sg-big-buff [ Generic SCSI interface (sg) ]
- version
+- zero-paged [ PPC only ]

==============================================================

@@ -51,30 +51,6 @@

==============================================================

-dentry-state:
-
-From linux/fs/dentry.c:
---------------------------------------------------------------
-struct {
- int nr_dentry;
- int nr_unused;
- int age_limit; /* age in seconds */
- int want_pages; /* pages requested by system */
- int dummy[2];
-} dentry_stat = {0, 0, 45, 0,};
---------------------------------------------------------------
-
-Dentries are dynamically allocated and deallocated, and
-nr_dentry seems to be 0 all the time. Hence it's safe to
-assume that only nr_unused, age_limit and want_pages are
-used. Nr_unused seems to be exactly what its name says.
-Age_limit is the age in seconds after which dcache entries
-can be reclaimed when memory is short and want_pages is
-nonzero when shrink_dcache_pages() has been called and the
-dcache isn't pruned yet.
-
-==============================================================
-
domainname & hostname:

These files can be controlled to set the domainname and
@@ -86,52 +62,12 @@

==============================================================

-file-max & file-nr:
-
-The kernel allocates file handles dynamically, but as yet it
-doesn't free them again.
-
-The value in file-max denotes the maximum number of file-
-handles that the Linux kernel will allocate. When you get lots
-of error messages about running out of file handles, you might
-want to increase this limit.
-
-The three values in file-nr denote the number of allocated
-file handles, the number of used file handles and the maximum
-number of file handles. When the allocated file handles come
-close to the maximum, but the number of actually used ones is
-far behind, you've encountered a peak in your usage of file
-handles and you don't need to increase the maximum.
-
-==============================================================
-
-inode-max, inode-nr & inode-state:
-
-As with file handles, the kernel allocates the inode structures
-dynamically, but can't free them yet.
-
-The value in inode-max denotes the maximum number of inode
-handlers. This value should be 3-4 times larger than the value
-in file-max, since stdin, stdout and network sockets also
-need an inode struct to handle them. When you regularly run
-out of inodes, you need to increase this value.
-
-The file inode-nr contains the first two items from
-inode-state, so we'll skip to that file...
-
-Inode-state contains three actual numbers and four dummies.
-The actual numbers are, in order of appearance, nr_inodes,
-nr_free_inodes and preshrink.
-
-Nr_inodes stands for the number of inodes the system has
-allocated, this can be slightly more than inode-max because
-Linux allocates them one pageful at a time.
-
-Nr_free_inodes represents the number of free inodes (?) and
-preshrink is nonzero when the nr_inodes > inode-max and the
-system needs to prune the inode list instead of allocating
-more.
+htab-reclaim: (PPC only)

+Setting this to a non-zero value, the PowerPC htab
+(see Documentation/powerpc/ppc_htab.txt) is pruned
+each time the system hits the idle loop.
+
==============================================================

osrelease, ostype & version:
@@ -159,6 +95,13 @@

==============================================================

+powersave-nap: (PPC only)
+
+If set, Linux-PPC will use the 'nap' mode of powersaving,
+otherwise the 'doze' mode will be used.
+
+==============================================================
+
printk:

The four values in printk denote: console_loglevel,
@@ -184,27 +127,30 @@

==============================================================

-securelevel:
+reboot-cmd: (Sparc only)

-When the value in this file is nonzero, root is prohibited
-from:
-- changing the immutable and append-only flags on files
-- changing sysctl things (limited ???)
+??? This seems to be a way to give an argument to the Sparc
+ROM/Flash boot loader. Maybe to tell it what to do after
+rebooting. ???

==============================================================

-real-root-dev: (CONFIG_INITRD only)
+sg-big-buff:

-This file is used to configure the real root device when using
-an initial ramdisk to configure the system before switching to
-the 'real' root device. See linux/Documentation/initrd.txt for
-more info.
+This file shows the size of the generic SCSI (sg) buffer.
+You can't tune it just yet, but you could change it on
+compile time by editing include/scsi/sg.h and changing
+the value of SG_BIG_BUFF.

-==============================================================
+There shouldn't be any reason to change this value. If
+you can come up with one, you probably know what you
+are doing anyway :)

-reboot-cmd: (Sparc only)
+==============================================================

-??? This seems to be a way to give an argument to the Sparc
-ROM/Flash boot loader. Maybe to tell it what to do after
-rebooting. ???
+zero-paged: (PPC only)

+When enabled (non-zero), Linux-PPC will pre-zero pages in
+the idle loop, possibly speeding up get_free_pages. Since
+this only affects what the idle loop is doing, you should
+enable this and see if anything changes.
--- Documentation/sysctl/vm.txt.orig Wed Jun 24 23:30:07 1998
+++ Documentation/sysctl/vm.txt Sun Aug 23 12:38:27 1998
@@ -1,4 +1,4 @@
-Documentation for /proc/sys/vm/* version 0.1
+Documentation for /proc/sys/vm/* kernel version 2.1.117
(c) 1998, Rik van Riel <H.H.vanRiel@phys.uu.nl>

For general info and legal blurb, please look in README.
@@ -20,6 +20,7 @@
- kswapd
- overcommit_memory
- pagecache
+- pagetable_cache
- swapctl
- swapout_interval

@@ -101,8 +102,9 @@
min_percent -- this is the minimum percentage of memory
that should be spent on buffer memory
borrow_percent -- when Linux is short on memory, and the
- buffer cache uses more memory, free pages
- are stolen from it
+ buffer cache uses more memory than this,
+ the MM subsystem will prune the buffercache
+ more heavily than other memory
max_percent -- this is the maximum amount of memory that
can be used for buffer memory

@@ -112,25 +114,17 @@
This file contains the values in the struct freepages. That
struct contains three members: min, low and high.

-Although the goal of the Linux memory management subsystem
-is to avoid fragmentation and make large chunks of free
-memory (so that we can hand out DMA buffers and such), there
-still are some page-based limits in the system, mainly to
-make sure we don't waste too much memory trying to get large
-free area's.
-
The meaning of the numbers is:

freepages.min When the number of free pages in the system
reaches this number, only the kernel can
allocate more memory.
-freepages.low If memory is too fragmented, the swapout
- daemon is started, except when the number
- of free pages is larger than freepages.low.
-freepages.high The swapping daemon exits when memory is
- sufficiently defragmented, when the number
- of free pages reaches freepages.high or when
- it has tried the maximum number of times.
+freepages.low If the number of free pages gets below this
+ point, the kernel starts swapping agressively.
+freepages.high The kernel tries to keep up to this amount of
+ memory free; if memory comes below this point,
+ the kernel gently starts swapping in the hopes
+ that it never has to do real agressive swapping.

==============================================================

@@ -210,11 +204,29 @@

This file does exactly the same as buffermem, only this
file controls the struct page_cache, and thus controls
-the amount of memory allowed for memory mapping of files.
+the amount of memory allowed for memory mapping and generic
+caching of files.

You don't want the minimum level to be too low, otherwise
your system might thrash when memory is tight or fragmentation
is high...
+
+==============================================================
+
+pagetable_cache:
+
+The kernel keeps a number of page tables in a per-processor
+cache (this helps a lot on SMP systems). The cache size for
+each processor will be between the low and the high value.
+
+On a low-memory, single CPU system you can safely set these
+values to 0 so you don't waste the memory. On SMP systems it
+is used so that the system can do fast pagetable allocations
+without having to aquire the kernel memory lock.
+
+For large systems, the settings are probably OK. For normal
+systems they won't hurt a bit. For small systems (<16MB ram)
+it might be advantageous to set both values to 0.

==============================================================

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html