diff options
author | Andrea Arcangeli <aarcange@redhat.com> | 2011-01-13 18:47:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 20:32:45 -0500 |
commit | d39d33c332c611094f84cee39715866f4cbf79e2 (patch) | |
tree | d4b2a0d53867b9b679c098a08f831dca148acb19 /mm | |
parent | f000565adb770b14cebbafde0a4f3e61a3342a63 (diff) |
thp: enable direct defrag
With memory compaction in, and lumpy-reclaim disabled, it seems safe
enough to defrag memory during the (synchronous) transparent hugepage page
faults (TRANSPARENT_HUGEPAGE_DEFRAG_FLAG) and not only during khugepaged
(async) hugepage allocations that was already enabled even before memory
compaction was in (TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG).
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/huge_memory.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 4ed97a2a115f..0415a83afd66 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | unsigned long transparent_hugepage_flags __read_mostly = | 29 | unsigned long transparent_hugepage_flags __read_mostly = |
30 | (1<<TRANSPARENT_HUGEPAGE_FLAG)| | 30 | (1<<TRANSPARENT_HUGEPAGE_FLAG)| |
31 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_FLAG)| | ||
31 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG); | 32 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG); |
32 | 33 | ||
33 | /* default scan 8*512 pte (or vmas) every 30 second */ | 34 | /* default scan 8*512 pte (or vmas) every 30 second */ |