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>
This commit is contained in:
committed by
Linus Torvalds
parent
ce83d2174e
commit
13ece886d9
@@ -27,7 +27,12 @@
|
||||
* allocations.
|
||||
*/
|
||||
unsigned long transparent_hugepage_flags __read_mostly =
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS
|
||||
(1<<TRANSPARENT_HUGEPAGE_FLAG)|
|
||||
#endif
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE_MADVISE
|
||||
(1<<TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG)|
|
||||
#endif
|
||||
(1<<TRANSPARENT_HUGEPAGE_DEFRAG_FLAG)|
|
||||
(1<<TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user