diff options
author | Andrea Arcangeli <aarcange@redhat.com> | 2011-01-13 18:47:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 20:32:45 -0500 |
commit | 13ece886d99cd668483113f7238e419d5331af26 (patch) | |
tree | 44a1c65870ba4463316f943f52d898bb3763ab81 /mm/huge_memory.c | |
parent | ce83d2174ea9c3d72d5821cf3ebc974e36391bf7 (diff) |
thp: transparent hugepage config choice
Allow to choose between the always|madvise default for page faults and
khugepaged at config time. madvise guarantees zero risk of higher memory
footprint for applications (applications using madvise(MADV_HUGEPAGE)
won't risk to use any more memory by backing their virtual regions with
hugepages).
Initially set the default to N and don't depend on EMBEDDED.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index bce6e12140e2..30c3cec82023 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
@@ -27,7 +27,12 @@ | |||
27 | * allocations. | 27 | * allocations. |
28 | */ | 28 | */ |
29 | unsigned long transparent_hugepage_flags __read_mostly = | 29 | unsigned long transparent_hugepage_flags __read_mostly = |
30 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS | ||
30 | (1<<TRANSPARENT_HUGEPAGE_FLAG)| | 31 | (1<<TRANSPARENT_HUGEPAGE_FLAG)| |
32 | #endif | ||
33 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE_MADVISE | ||
34 | (1<<TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG)| | ||
35 | #endif | ||
31 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_FLAG)| | 36 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_FLAG)| |
32 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG); | 37 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG); |
33 | 38 | ||