aboutsummaryrefslogtreecommitdiff
path: root/mm/Kconfig
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-05-18 10:15:09 +0200
committerIngo Molnar <mingo@elte.hu>2009-05-18 10:15:35 +0200
commit1079cac0f4eb7d968395378b1625979d4c818dd6 (patch)
treed261058d95d27fe7250511d5fad69db30dc17731 /mm/Kconfig
parent5872144f64b34a5942f6b4acedc90b02de72c58b (diff)
parent1406de8e11eb043681297adf86d6892ff8efc27a (diff)
Merge commit 'v2.6.30-rc6' into tracing/core
Merge reason: we were on an -rc4 base, sync up to -rc6 Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/Kconfig')
-rw-r--r--mm/Kconfig28
1 files changed, 28 insertions, 0 deletions
diff --git a/mm/Kconfig b/mm/Kconfig
index 57971d2ab84..c2b57d81e15 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -225,3 +225,31 @@ config HAVE_MLOCKED_PAGE_BIT
config MMU_NOTIFIER
bool
+
+config NOMMU_INITIAL_TRIM_EXCESS
+ int "Turn on mmap() excess space trimming before booting"
+ depends on !MMU
+ default 1
+ help
+ The NOMMU mmap() frequently needs to allocate large contiguous chunks
+ of memory on which to store mappings, but it can only ask the system
+ allocator for chunks in 2^N*PAGE_SIZE amounts - which is frequently
+ more than it requires. To deal with this, mmap() is able to trim off
+ the excess and return it to the allocator.
+
+ If trimming is enabled, the excess is trimmed off and returned to the
+ system allocator, which can cause extra fragmentation, particularly
+ if there are a lot of transient processes.
+
+ If trimming is disabled, the excess is kept, but not used, which for
+ long-term mappings means that the space is wasted.
+
+ Trimming can be dynamically controlled through a sysctl option
+ (/proc/sys/vm/nr_trim_pages) which specifies the minimum number of
+ excess pages there must be before trimming should occur, or zero if
+ no trimming is to occur.
+
+ This option specifies the initial value of this option. The default
+ of 1 says that all excess pages should be trimmed.
+
+ See Documentation/nommu-mmap.txt for more information.