diff options
author | Mel Gorman <mel@csn.ul.ie> | 2010-05-24 17:32:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 11:06:59 -0400 |
commit | 5e7719058079a1423ccce56148b0aaa56b2df821 (patch) | |
tree | 3666cb3d5540dcaa3d8e7df8c293a0ad603a181c /Documentation | |
parent | 56de7263fcf3eb10c8dcdf8d59a9cec831795f3f (diff) |
mm: compaction: add a tunable that decides when memory should be compacted and when it should be reclaimed
The kernel applies some heuristics when deciding if memory should be
compacted or reclaimed to satisfy a high-order allocation. One of these
is based on the fragmentation. If the index is below 500, memory will not
be compacted. This choice is arbitrary and not based on data. To help
optimise the system and set a sensible default for this value, this patch
adds a sysctl extfrag_threshold. The kernel will only compact memory if
the fragmentation index is above the extfrag_threshold.
[randy.dunlap@oracle.com: Fix build errors when proc fs is not configured]
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/sysctl/vm.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index 56dd29b97a9..5fdbb612aeb 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -27,6 +27,7 @@ Currently, these files are in /proc/sys/vm: | |||
27 | - dirty_ratio | 27 | - dirty_ratio |
28 | - dirty_writeback_centisecs | 28 | - dirty_writeback_centisecs |
29 | - drop_caches | 29 | - drop_caches |
30 | - extfrag_threshold | ||
30 | - hugepages_treat_as_movable | 31 | - hugepages_treat_as_movable |
31 | - hugetlb_shm_group | 32 | - hugetlb_shm_group |
32 | - laptop_mode | 33 | - laptop_mode |
@@ -149,6 +150,20 @@ user should run `sync' first. | |||
149 | 150 | ||
150 | ============================================================== | 151 | ============================================================== |
151 | 152 | ||
153 | extfrag_threshold | ||
154 | |||
155 | This parameter affects whether the kernel will compact memory or direct | ||
156 | reclaim to satisfy a high-order allocation. /proc/extfrag_index shows what | ||
157 | the fragmentation index for each order is in each zone in the system. Values | ||
158 | tending towards 0 imply allocations would fail due to lack of memory, | ||
159 | values towards 1000 imply failures are due to fragmentation and -1 implies | ||
160 | that the allocation will succeed as long as watermarks are met. | ||
161 | |||
162 | The kernel will not compact memory in a zone if the | ||
163 | fragmentation index is <= extfrag_threshold. The default value is 500. | ||
164 | |||
165 | ============================================================== | ||
166 | |||
152 | hugepages_treat_as_movable | 167 | hugepages_treat_as_movable |
153 | 168 | ||
154 | This parameter is only useful when kernelcore= is specified at boot time to | 169 | This parameter is only useful when kernelcore= is specified at boot time to |