summaryrefslogtreecommitdiffstats
path: root/Documentation/sysctl/vm.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/sysctl/vm.txt')
-rw-r--r--Documentation/sysctl/vm.txt56
1 files changed, 53 insertions, 3 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 774da3d5f..099d2a3b4 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -18,6 +18,7 @@ Currently, these files are in /proc/sys/vm:
- bdflush
- buffermem
- freepages
+- kswapd
- overcommit_memory
- pagecache
- swapctl
@@ -112,9 +113,58 @@ freepages:
This file contains the values in the struct freepages. That
struct contains three members: min, low and high.
-These variables are currently unused (?), but they're
-very likely to be abused for something else in the near
-future, so don't yet remove it from the source...
+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.
+
+==============================================================
+
+kswapd:
+
+Kswapd is the kernel swapout daemon. That is, kswapd is that
+piece of the kernel that frees memory when it get's fragmented
+or full. Since every system is different, you'll probably want
+some control over this piece of the system.
+
+The numbers in this page correspond to the numbers in the
+struct pager_daemon {tries_base, tries_min, swap_cluster
+}; The tries_base and swap_cluster probably have the
+largest influence on system performance.
+
+tries_base The maximum number of pages kswapd tries to
+ free in one round is calculated from this
+ number. Usually this number will be divided
+ by 4 or 8 (see mm/vmscan.c), so it isn't as
+ big as it looks.
+ When you need to increase the bandwith to/from
+ swap, you'll want to increase this number.
+tries_min This is the minimum number of times kswapd
+ tries to free a page each time it is called.
+ Basically it's just there to make sure that
+ kswapd frees some pages even when it's being
+ called with minimum priority.
+swap_cluster This is the number of pages kswapd writes in
+ one turn. You want this large so that kswapd
+ does it's I/O in large chunks and the disk
+ doesn't have to seek often, but you don't want
+ it to be too large since that would flood the
+ request queue.
==============================================================