aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndrea Arcangeli <aarcange@redhat.com>2011-01-13 18:47:07 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 20:32:45 -0500
commit5d6892407cab23d4bf2f6de065ca351a53849323 (patch)
treefd1a32bd669b787ed1a651cc68c9f4def1fbd41e /mm
parent13ece886d99cd668483113f7238e419d5331af26 (diff)
thp: select CONFIG_COMPACTION if TRANSPARENT_HUGEPAGE enabled
With transparent hugepage support we need compaction for the "defrag" sysfs controls to be effective. At the moment THP hangs the system if COMPACTION isn't selected, as without COMPACTION lumpy reclaim wouldn't be entirely disabled. So at the moment it's not orthogonal. When lumpy will be removed from the VM I can remove the select COMPACTION in theory, but then 99% of THP users would be still doing a mistake in disabling compaction, even if the mistake won't return in fatal runtime but just slightly degraded performance. So from a theoretical standpoing forcing the below select is not needed (the dependency isn't strict nor at compile time nor at runtime) but from a practical standpoint it is safer. If anybody really wants THP to run without compaction, it'd be such a weird setup that editing the Kconfig file to allow it will be surely not a problem. Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Acked-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/Kconfig b/mm/Kconfig
index 3e81687263b5..3ad483bdf505 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -305,6 +305,7 @@ config NOMMU_INITIAL_TRIM_EXCESS
305config TRANSPARENT_HUGEPAGE 305config TRANSPARENT_HUGEPAGE
306 bool "Transparent Hugepage Support" 306 bool "Transparent Hugepage Support"
307 depends on X86 && MMU 307 depends on X86 && MMU
308 select COMPACTION
308 help 309 help
309 Transparent Hugepages allows the kernel to use huge pages and 310 Transparent Hugepages allows the kernel to use huge pages and
310 huge tlb transparently to the applications whenever possible. 311 huge tlb transparently to the applications whenever possible.